File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1- FROM ghcr.io/super-linter/super-linter:slim-v8.0.0
1+ FROM ghcr.io/super-linter/super-linter:slim-v8.0.0 AS linter
22
33HEALTHCHECK --interval=5m --timeout=10s --start-period=30s --retries=3 CMD ["/bin/sh" ,"-c" ,"test -d /github/home" ]
44ARG UID=1000
@@ -10,3 +10,7 @@ ENV RUN_LOCAL=true
1010ENV USE_FIND_ALGORITHM=true
1111ENV LOG_LEVEL=WARN
1212ENV LOG_FILE="/github/home/logs"
13+
14+ FROM ghcr.io/googlecontainertools/container-structure-test:1.22.0 AS structure-test
15+
16+ HEALTHCHECK --interval=5m --timeout=10s --start-period=30s --retries=3 CMD ["container-structure-test" , "version" ]
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ define run_linter
3636 DEFAULT_WORKSPACE="$(CURDIR ) "; \
3737 LINTER_IMAGE="linter:latest"; \
3838 VOLUME="$$DEFAULT_WORKSPACE:$$DEFAULT_WORKSPACE"; \
39- docker build --build-arg UID=$(shell id -u) --build-arg GID=$(shell id -g) --tag $$LINTER_IMAGE .; \
39+ docker build --target linter -- build-arg UID=$(shell id -u) --build-arg GID=$(shell id -g) --tag $$LINTER_IMAGE .; \
4040 docker run \
4141 -e DEFAULT_WORKSPACE="$$DEFAULT_WORKSPACE" \
4242 -e FILTER_REGEX_INCLUDE="$(filter-out $@ ,$(MAKECMDGOALS ) ) " \
@@ -61,11 +61,13 @@ define run_tests
6161 fi; \
6262 echo "Building image $$IMAGE_NAME..."; \
6363 docker buildx build -t "$$IMAGE_NAME:test" "$$IMAGE_DIR" || exit 1; \
64+ echo "Building structure-test image..."; \
65+ docker build --target structure-test --tag structure-test:latest . || exit 1; \
6466 echo "Running tests for $$IMAGE_NAME..."; \
6567 docker run --rm \
6668 -v /var/run/docker.sock:/var/run/docker.sock \
6769 -v "$$IMAGE_DIR:/workspace" \
68- ghcr.io/googlecontainertools/container- structure-test:v1.22.0 \
70+ structure-test:latest \
6971 test --image "$$IMAGE_NAME:test" --config /workspace/container-structure-test.yaml
7072endef
7173
You can’t perform that action at this time.
0 commit comments