Repository navigation
Add CI, validation, and (mocked) AWS CD GitHub Actions workflows - #33
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
Runtime verification of the CI/CD workflow commandsRan the workflow commands that hadn't been executed locally, on a clean checkout of this branch (JDK 21.0.11, Node 22 shell / Node 24.13.0 via frontend-maven-plugin), plus an app smoke test. GitHub Actions CI on this PR is green (all 6 checks).
App regression smoke (dev profile, H2) — passedBackend Non-blocking observations
|
Summary
Adds GitHub Actions CI/CD for this JHipster monolith. Every command is taken from the repo's own
pom.xml/package.jsonscripts and was run locally on this branch (results below) — nothing invented..github/workflows/ci.yml(push to main/master + PRs): three jobs —build(fast path,./mvnw -ntp -B verify -DskipTests -Pprod, uploads the jar),backend(./mvnw -ntp -B verify→ surefire + failsafe + JaCoCo; JUnit report published viamikepenz/action-junit-report,target/site/jacoco*/uploaded as a coverage artifact), andfrontend(npm run lint,npm test→ Vitest with coverage intotarget/test-results). No matrix: the app pins exactly one Java (21) and one Node (24.13.0) version inpom.xml, so a matrix would only add noise..github/workflows/validation.yml:format(npm run prettier:check,./mvnw spotless:check,./mvnw checkstyle:check— this repo'scheckstyle.xmlis the JHipster nohttp ruleset) anddependency-scan(npm audit --audit-level=high, non-blocking, plus a Trivy fs scan uploaded as SARIF to code scanning), also on a weekly cron..github/workflows/cd.yml: Jib → ECR → ECS deploy, fully mocked..github/dependabot.yml: maven / npm / github-actions, weekly, with grouped minor+patch updates..github/README.md(workflow table, mocked-value table, secrets/variables, how to make CD real) plus a short pointer section in the rootREADME.md.Both CI and Validation use concurrency groups that cancel superseded runs on branches but never on
main/master, and least-privilegepermissions:(contents: readby default;security-events: writeonly on the SARIF job,id-token: writeonly on the CD jobs that assume a role).CD is mocked and triple-gated
All AWS identifiers are placeholders (
123456789012,us-east-1,demo-cluster,demo-jhipster,arn:aws:iam::123456789012:role/demo-github-actions-deploy), marked as such in a header comment and at each use. It cannot reach real infra:workflow_dispatchonly;dry_runinput defaults totrue— every AWS step isif: dry_run == 'false', and the mock path echoes the exactaws ecs update-service/kubectl set imagecommand it would have run;dry_run=false, a real run also requires repo variableENABLE_REAL_DEPLOY == 'true'(unset here).The dry-run path still genuinely exercises Jib via
jib:dockerBuild -Dimage=...(local daemon, no push), and the deploy job renders a real ECS task definition throughamazon-ecs-render-task-definitionso the templating is validated even in mock mode.productionuses a GitHub environment so the deploy job pauses for required-reviewer approval.Verification
Run locally on this branch:
./mvnw -ntp -B verifytarget/site/jacoco{,-it}npm test(lint + Vitest coverage)npm run prettier:check./mvnw spotless:check checkstyle:checkactionlinton all three workflows.github/**/*.ymlNot run locally: the CD workflow (it targets non-existent mocked AWS resources; the dry-run path would need a Docker daemon and is the only path that could run at all) and the Trivy/SARIF upload step (requires the GitHub code-scanning API).
Artifact paths in the workflows were taken from the actual local build output, not guessed:
target/surefire-reports/,target/failsafe-reports/,target/site/jacoco*/, andtarget/test-results/(fromvitest-base.config.ts'sreportsDirectory).Notes
@v4,@v5,@v2,@v3). The one exception isaquasecurity/trivy-action, which publishes no major-version tag, so it is pinned to the exact release0.28.0; this is documented in.github/README.mdand Dependabot's github-actions ecosystem will keep it current.JAVA_VERSION/NODE_VERSIONare duplicated as workflow env vars mirroringpom.xml; they need to be updated together when the pom bumps.Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/f746db0d50d24ed6beec3e79267a8f92
Requested by: @mbatchelor81