-
Notifications
You must be signed in to change notification settings - Fork 0
Chore: [AEA-0000] - add tflint to eps-storage-terraform #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
440d220
f5d589c
a38b6cd
a1f4631
4e9d982
a9193c1
636d055
0877192
4fc4b74
55d554e
4098d86
f304a05
3306be3
567bfe2
1c1a353
c46f3b2
11f14ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -12,14 +12,15 @@ guard-%: | |||||||||||||||||||||
|
|
||||||||||||||||||||||
| .PHONY: install install-python install-node install-hooks build-base-image build-node-24-image build-node-24-python-3-10-image build-node-24-python-3-12-image build-node-24-python-3-13-image build-node-24-python-3-14-image \ | ||||||||||||||||||||||
| build-eps-storage-terraform-image build-eps-data-extract-image build-fhir-facade-image build-node-24-python-3-14-golang-1-24-image build-node-24-python-3-14-java-24-image \ | ||||||||||||||||||||||
| build-regression-tests-image build-all build-image build-githubactions-image scan-image scan-image-json shell-image lint test lint-githubactions lint-githubaction-scripts clean | ||||||||||||||||||||||
| build-regression-tests-image build-all build-image build-githubactions-image scan-image scan-image-json shell-image lint test lint-githubactions lint-githubaction-scripts clean \ | ||||||||||||||||||||||
| build-syft build-grype build-grant build-tflint | ||||||||||||||||||||||
| install: install-python install-node install-hooks | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| install-python: | ||||||||||||||||||||||
| poetry install | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| install-node: | ||||||||||||||||||||||
| npm install | ||||||||||||||||||||||
| npm ci --ignore-scripts | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| install-hooks: install-python | ||||||||||||||||||||||
| poetry run pre-commit install --install-hooks --overwrite | ||||||||||||||||||||||
|
|
@@ -43,7 +44,7 @@ build-node-24-python-3-14-image: | |||||||||||||||||||||
| CONTAINER_NAME=node_24_python_3_14 BASE_VERSION_TAG=local-build BASE_FOLDER=languages IMAGE_TAG=local-build $(MAKE) build-image | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| build-eps-storage-terraform-image: | ||||||||||||||||||||||
| CONTAINER_NAME=eps_storage_terraform BASE_VERSION_TAG=local-build BASE_FOLDER=projects IMAGE_TAG=local-build $(MAKE) build-image | ||||||||||||||||||||||
| CONTAINER_NAME=eps-storage-terraform BASE_VERSION_TAG=local-build BASE_FOLDER=projects IMAGE_TAG=local-build $(MAKE) build-image | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| build-eps-data-extract-image: | ||||||||||||||||||||||
| CONTAINER_NAME=eps_data_extract BASE_VERSION_TAG=local-build BASE_FOLDER=projects IMAGE_TAG=local-build $(MAKE) build-image | ||||||||||||||||||||||
|
|
@@ -65,14 +66,37 @@ build-all: build-base-image build-node-24-image build-node-24-python-3-10-image | |||||||||||||||||||||
| build-regression-tests-image | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| build-syft: | ||||||||||||||||||||||
| docker build -f src/base/.devcontainer/Dockerfile.syft --tag local_syft:latest src/base/.devcontainer/ | ||||||||||||||||||||||
| @if docker image inspect local_syft:latest >/dev/null 2>&1; then \ | ||||||||||||||||||||||
| echo "Image local_syft:latest already exists. Skipping build."; \ | ||||||||||||||||||||||
| else \ | ||||||||||||||||||||||
| docker build -f src/base/.devcontainer/Dockerfile.syft --tag local_syft:latest src/base/.devcontainer/; \ | ||||||||||||||||||||||
| fi | ||||||||||||||||||||||
| build-grype: | ||||||||||||||||||||||
| docker build -f src/base/.devcontainer/Dockerfile.grype --tag local_grype:latest src/base/.devcontainer/ | ||||||||||||||||||||||
| @if docker image inspect local_grype:latest >/dev/null 2>&1; then \ | ||||||||||||||||||||||
| echo "Image local_grype:latest already exists. Skipping build."; \ | ||||||||||||||||||||||
| else \ | ||||||||||||||||||||||
| docker build -f src/base/.devcontainer/Dockerfile.grype --tag local_grype:latest src/base/.devcontainer/; \ | ||||||||||||||||||||||
| fi | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| build-grant: | ||||||||||||||||||||||
| docker build -f src/base/.devcontainer/Dockerfile.grant --tag local_grant:latest src/base/.devcontainer/ | ||||||||||||||||||||||
| @if docker image inspect local_grant:latest >/dev/null 2>&1; then \ | ||||||||||||||||||||||
| echo "Image local_grant:latest already exists. Skipping build."; \ | ||||||||||||||||||||||
| else \ | ||||||||||||||||||||||
| docker build -f src/base/.devcontainer/Dockerfile.grant --tag local_grant:latest src/base/.devcontainer/; \ | ||||||||||||||||||||||
| fi | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| build-tflint: | ||||||||||||||||||||||
| @if docker image inspect local_tflint:latest >/dev/null 2>&1; then \ | ||||||||||||||||||||||
| echo "Image local_tflint:latest already exists. Skipping build."; \ | ||||||||||||||||||||||
| else \ | ||||||||||||||||||||||
| docker buildx build \ | ||||||||||||||||||||||
| --secret id=GH_TOKEN,env=GITHUB_TOKEN \ | ||||||||||||||||||||||
| -f src/projects/eps-storage-terraform/.devcontainer/Dockerfile.tflint \ | ||||||||||||||||||||||
| --tag local_tflint:latest \ | ||||||||||||||||||||||
| src/projects/eps-storage-terraform/.devcontainer/; \ | ||||||||||||||||||||||
| fi | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| build-image: build-syft build-grype build-grant guard-CONTAINER_NAME guard-BASE_VERSION_TAG guard-BASE_FOLDER guard-IMAGE_TAG | ||||||||||||||||||||||
| build-image: build-syft build-grype build-grant build-tflint guard-CONTAINER_NAME guard-BASE_VERSION_TAG guard-BASE_FOLDER guard-IMAGE_TAG | ||||||||||||||||||||||
|
||||||||||||||||||||||
| build-image: build-syft build-grype build-grant build-tflint guard-CONTAINER_NAME guard-BASE_VERSION_TAG guard-BASE_FOLDER guard-IMAGE_TAG | |
| build-image: build-syft build-grype build-grant guard-CONTAINER_NAME guard-BASE_VERSION_TAG guard-BASE_FOLDER guard-IMAGE_TAG | |
| if [ "$${CONTAINER_NAME}" = "eps_storage_terraform" ]; then \ | |
| $(MAKE) build-tflint; \ | |
| fi; \ |
Copilot
AI
Apr 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build-image now always depends on build-tflint, which requires a GitHub token secret to be present and pulls/builds an extra image even when building unrelated containers (e.g., base, node_24_*). This makes local builds and CI builds for other images fail or do unnecessary work. Consider only building local_tflint when the target container actually needs it (e.g., conditionally in the eps-storage-terraform build, or by making the Dockerfile fall back when local_tflint is absent).
| build-image: build-syft build-grype build-grant build-tflint guard-CONTAINER_NAME guard-BASE_VERSION_TAG guard-BASE_FOLDER guard-IMAGE_TAG | |
| build-image: build-syft build-grype build-grant guard-CONTAINER_NAME guard-BASE_VERSION_TAG guard-BASE_FOLDER guard-IMAGE_TAG | |
| if [ "$${CONTAINER_NAME}" = "eps_storage_terraform" ]; then \ | |
| $(MAKE) build-tflint; \ | |
| fi; \ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| shellcheck 0.11.0 | ||
| direnv 2.37.1 | ||
| actionlint 1.7.11 | ||
| actionlint 1.7.12 | ||
| ruby 3.3.0 | ||
| yq 4.52.4 | ||
| yq 4.52.5 |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,13 @@ | ||||||||||
| FROM serversideup/github-cli:2.89.0 AS build | ||||||||||
| ARG TARGETARCH | ||||||||||
| ARG TFLINT_VERSION="v0.61.0" | ||||||||||
| COPY --chmod=755 scripts/install_tflint.sh /tmp/install_tflint.sh | ||||||||||
| RUN --mount=type=secret,id=GH_TOKEN,env=GH_TOKEN \ | ||||||||||
| INSTALL_DIR=/tmp/tflint/ \ | ||||||||||
| ARCH="${TARGETARCH}" \ | ||||||||||
| VERSION="${TFLINT_VERSION}" \ | ||||||||||
|
Comment on lines
+7
to
+8
|
||||||||||
| ARCH="${TARGETARCH}" \ | |
| VERSION="${TFLINT_VERSION}" \ | |
| TARGETARCH="${TARGETARCH}" \ | |
| TFLINT_VERSION="${TFLINT_VERSION}" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docker buildx builddoes not necessarily load the resulting image into the local Docker engine unless--load(or an appropriate--output) is specified. The subsequentdocker image inspect local_tflint:latest/docker save local_tflint:latestflow in CI will fail if the image was built but not loaded. Add--load(or switch todocker build) to ensurelocal_tflint:latestexists locally.