You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Context:** This is the pipeline implementation from [devops-labs Module-3 Mini-Project 9](https://github.com/darestack/devops-labs/tree/main/Module-3/mini-project-09). Full implementation notes live there.
6
6
@@ -10,7 +10,7 @@
10
10
11
11
| Stage | What It Does | Key Detail |
12
12
|---|---|---|
13
-
|`test`| Unit tests across multiple Node.js versions | Build matrix: Node 18 and 20 with npm dependency caching. This job also runs the hard lint gate. |
13
+
|`test`| Unit tests across supported Node.js versions | Build matrix: Node 22 and 24 with npm dependency caching. This job also runs the hard lint gate. |
14
14
|`code-quality`| ESLint SARIF upload | Publishes lint annotations to GitHub Code Scanning. The hard lint gate lives in the `test` job. |
15
15
|`security`| Trivy vulnerability scan | Results uploaded as SARIF to GitHub Code Scanning |
16
16
|`build`| Docker image creation | Pushes to GHCR tagged with both `branch-name` and `commit-SHA`|
@@ -23,7 +23,7 @@
23
23
```
24
24
Push to main / PR opened
25
25
│
26
-
├── test (matrix: Node 18, 20)
26
+
├── test (matrix: Node 22, 24)
27
27
│ └── npm ci (cached) → npm run lint → npm test → coverage report
28
28
│
29
29
├── code-quality
@@ -45,14 +45,18 @@ Push to main / PR opened
45
45
46
46
## Key Implementation Decisions
47
47
48
-
**GHCR image tagging:** Each image is tagged with both `latest` and the commit SHA — enabling rollback to any previous build without relying on the `latest` tag alone.
48
+
**Supported Node versions:** The workflow uses Node 22 and 24 rather than EOL runtime lines. The Docker image uses Node 24 Alpine for the build and runtime stages.
49
+
50
+
**GHCR image tagging:** Each image is tagged with branch and commit-SHA-derived tags, and `latest` is emitted only for the default branch. That makes rollback easier than relying on `latest` alone.
49
51
50
52
**ESLint as a hard gate:** The matrix `test` job runs `npm run lint` before tests. The separate `code-quality` job keeps `continue-on-error` for SARIF upload so annotations can still be published for review.
51
53
52
54
**Trivy SARIF upload:** Required adding `security-events: write` to the job-level permissions block. Without this, the upload fails silently.
53
55
54
56
**Docker Buildx:** The default GitHub Actions Docker driver does not support cache export. Fixed by adding `docker/setup-buildx-action@v3` before the build step.
55
57
58
+
**Security scan before build:** The Docker build waits for tests, code-quality SARIF upload, and Trivy filesystem scanning.
59
+
56
60
**GHCR push permissions:**`GITHUB_TOKEN` requires explicit `packages: write` in the build job permissions to create new container packages.
57
61
58
62
---
@@ -73,7 +77,7 @@ Push to `main` or open a PR to trigger the full pipeline.
73
77
74
78
## Current Boundary
75
79
76
-
The staging and production deploy jobs are intentionally simulated in this lab. They show environment flow and dependency ordering, but they do not deploy to a real target yet. To make this a production deployment project, replace the `echo` deployment steps with a real target such as EC2, ECS, Kubernetes, or a PaaS and add deployment logs.
80
+
The staging and production deploy jobs are intentionally simulated in this lab. They show environment flow, dependency ordering, image handoff, environment URLs, and notification wiring, but they do not deploy to a real target yet. To make this a production deployment project, replace the `echo` deployment steps with a real target such as EC2, ECS, Kubernetes, or a PaaS and add deployment logs.
0 commit comments