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
Copy file name to clipboardExpand all lines: README.md
+20-16Lines changed: 20 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,18 +121,20 @@ Images under languages should point to a dockerfile under src/common that is bas
121
121
We use trivy to scan for vulnerabilities in the built docker images. Known vulnerabilities in the base image are in `src/common/.trivyignore.yaml`. Vulnerabilities in specific images are in `.trivyignore.yaml` file in each images folder. These are combined before running a scan to exclude all known vulnerabilities
122
122
123
123
# Pull requests and merge to main process
124
-
For each pull request, and merge to main, images are built and scanned using trivy, but the images are not pushed to github container registry
125
-
Docker images are built for each pull request, and on merges to main.
126
-
Docker images are built for amd64 and arm64 architecture, and a combined manifest is created and pushed as part of the build.
127
-
Images are also created with user vscode mapped to user id 1001 so they can be used by github actions.
124
+
For each pull request, and merge to main, images are built and scanned using trivy, and pushed to github docker registry.
125
+
Docker images are built for amd64 and arm64 architecture, and a combined manifest is created and pushed as part of the build.
126
+
The main images have a vscode user with id 1000. A separately tagged image is also created with user vscode mapped to user id 1001 so they can be used by github actions.
128
127
129
128
The base image is built first, and then language images, and finally project images.
130
129
131
130
Docker images are scanned for vulnerabilities using trivy as part of a build step, and the build fails if vulnerabilities are found not in .trivyignore file.
132
131
133
-
For pull requests, images are tagged with the pr-<pullrequestid>-<shortcommitsha>.
134
-
For merges to main, images are tagged with the <shortcommitsha>.
135
-
Github actions images are tagged with githubactions-<tag>
132
+
For pull requests, images are tagged with the pr-{pull request id}-{short commit sha}.
133
+
For merges to main, images are tagged with the {short commit sha}.
134
+
Github actions images are tagged with githubactions-{tag}
135
+
Amd64 images are tagged with {tag}-amd64
136
+
Arm64 images are tagged with {tag}-arm64
137
+
Combined image manifest image is just tagged with {tag} so can be included in devcontainer.json and the correct image is pulled based on the host architecture.
136
138
137
139
When a pull request is merged to main or closed, all associated images are deleted from the registry using the github workflow delete_old_images
## Using local or pull request images in visual studio code
225
227
You can use local or pull request images by changing IMAGE_VERSION in devcontainer.json.
226
228
For an image built locally, you should put the IMAGE_VERSION=local-build.
227
229
For an image built from a pull request, you should put the IMAGE_VERSION=<tagofimageasshowinpullrequestjob>.
@@ -247,26 +249,28 @@ poetry run python \
247
249
```
248
250
249
251
## Common makefile targets
250
-
There are a set of common Makefiles that are defined in `src/base/.devcontainer/makefiles` and are included from `common.mk` that are installed to all built container images.
252
+
There are a set of common Makefiles that are defined in `src/base/.devcontainer/makefiles` and are included from `common.mk`. These are installed to all built container images.
251
253
252
254
This should be added to the end of each projects Makefile to include them
253
255
```
254
256
%:
255
257
@$(MAKE) -f /usr/local/share/eps/Mk/common.mk $@
256
258
```
259
+
### Targets
260
+
The following targets are defined. These are needed for quality checks to run. Some targets are project specific and so should be overridden in the projects Makefile.
257
261
258
262
Build targets (`build.mk`)
259
-
-`install` - placeholder target (currently not implemented)
260
-
-`install-node` - placeholder target (currently not implemented)
261
-
-`docker-build` - placeholder target (currently not implemented)
262
-
-`compile` - placeholder target (currently not implemented)
263
+
-`install` - placeholder target - should be overridden locally
264
+
-`install-node` - placeholder target - should be overridden locally
265
+
-`docker-build` - placeholder target - should be overridden locally
266
+
-`compile` - placeholder target - should be overridden locally
263
267
264
268
Check targets (`check.mk`)
265
-
-`lint` - placeholder target (currently not implemented)
266
-
-`test` - placeholder target (currently not implemented)
269
+
-`lint` - placeholder target - should be overridden locally
270
+
-`test` - placeholder target - should be overridden locally
267
271
-`shellcheck` - runs shellcheck on `scripts/*.sh` and `.github/scripts/*.sh` when files exist
268
272
-`cfn-lint` - runs `cfn-lint` against `cloudformation/**/*.yml|yaml` and `SAMtemplates/**/*.yml|yaml`
269
-
-`cdk-synth` - placeholder target (currently not implemented)
273
+
-`cdk-synth` - placeholder target - should be overridden locally
270
274
-`cfn-guard-sam-templates` - validates SAM templates against cfn-guard rulesets and writes outputs to `.cfn_guard_out/`
271
275
-`cfn-guard-cloudformation` - validates `cloudformation` templates against cfn-guard rulesets and writes outputs to `.cfn_guard_out/`
272
276
-`cfn-guard-cdk` - validates `cdk.out` against cfn-guard rulesets and writes outputs to `.cfn_guard_out/`
0 commit comments