diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99d4c3b..12f9127 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -487,8 +487,9 @@ jobs: - name: Verify that the Dockerfile matches the commited template and params run: |- - poetry run jinja2 Dockerfile.in Dockerfile.env > out - diff Dockerfile out + cp Dockerfile Dockerfile.orig + make Dockerfile + diff Dockerfile.orig Dockerfile - name: Build Dangerzone container image run: | diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index f7c187f..e08dcef 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -26,7 +26,7 @@ jobs: run: | date=$(date "+%Y%m%d") sed -i "s/DEBIAN_ARCHIVE_DATE=[0-9]\+/DEBIAN_ARCHIVE_DATE=${date}/" Dockerfile.env - poetry run jinja2 Dockerfile.in Dockerfile.env > Dockerfile + make Dockerfile - name: Build container image run: python3 ./install/common/build-image.py --runtime docker --no-save - name: Get image tag diff --git a/Makefile b/Makefile index 5a8ea40..17a35d3 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ lint: ## Check the code for linting, formatting, and typing issues with ruff and .PHONY: fix fix: ## apply all the suggestions from ruff ruff check --fix - ruff format + ruff format .PHONY: test test: @@ -47,6 +47,9 @@ test-large: test-large-init ## Run large test set python -m pytest --tb=no tests/test_large_set.py::TestLargeSet -v $(JUNIT_FLAGS) --junitxml=$(TEST_LARGE_RESULTS) python $(TEST_LARGE_RESULTS)/report.py $(TEST_LARGE_RESULTS) +Dockerfile: Dockerfile.env Dockerfile.in + poetry run jinja2 Dockerfile.in Dockerfile.env > Dockerfile + .PHONY: build-clean build-clean: doit clean diff --git a/docs/developer/reproducibility.md b/docs/developer/reproducibility.md index 25b3143..df68e58 100644 --- a/docs/developer/reproducibility.md +++ b/docs/developer/reproducibility.md @@ -37,7 +37,7 @@ If you update these values in `Dockerfile.env`, you must also create a new Dockerfile with: ``` -poetry run jinja2 Dockerfile.in Dockerfile.env > Dockerfile +make Dockerfile ``` Updating `Dockerfile` without bumping `Dockerfile.in` is detected and should