Public Access
DEVX-72: ci: add hadolint Dockerfile linter to CI
Post-merge / detect-type (push) Successful in 11s
Post-merge / validate-commit-msg (push) Successful in 8s
Build Images / detect-type (push) Successful in 40s
Post-merge / release (push) Failing after 26s
Post-merge / sync-wiki (push) Successful in 23s
Post-merge / vikunja (push) Successful in 14s
Post-merge / configure-repo (push) Successful in 14s
Post-merge / publish (push) Has been skipped
Post-merge / badges (push) Successful in 35s
Build Images / build-and-push (push) Successful in 3m6s
Build Images / cleanup (push) Successful in 49s
Post-merge / detect-type (push) Successful in 11s
Post-merge / validate-commit-msg (push) Successful in 8s
Build Images / detect-type (push) Successful in 40s
Post-merge / release (push) Failing after 26s
Post-merge / sync-wiki (push) Successful in 23s
Post-merge / vikunja (push) Successful in 14s
Post-merge / configure-repo (push) Successful in 14s
Post-merge / publish (push) Has been skipped
Post-merge / badges (push) Successful in 35s
Build Images / build-and-push (push) Successful in 3m6s
Build Images / cleanup (push) Successful in 49s
This commit was merged in pull request #121.
This commit is contained in:
@@ -0,0 +1,14 @@
|
|||||||
|
# Hadolint configuration for devx Dockerfiles
|
||||||
|
# https://github.com/hadolint/hadolint#configure
|
||||||
|
|
||||||
|
ignored:
|
||||||
|
- DL3008 # Don't require pinning apt package versions
|
||||||
|
- DL3013 # Don't require pinning pip package versions
|
||||||
|
- DL3018 # Don't require pinning apk package versions
|
||||||
|
- DL3007 # Using latest is intentional for tier images (rebuilt on every merge)
|
||||||
|
- SC2102 # False positive: pip extras [release,molecule,deploy] look like shell ranges
|
||||||
|
|
||||||
|
trustedRegistries:
|
||||||
|
- git.oblachno.oblachno.fyi
|
||||||
|
- docker.io
|
||||||
|
- gitea/runner-images
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
.PHONY: all setup setup-ci setup-quality setup-release setup-image install update lint lint-all test test-unit pytest-cov clean install-tools install-hooks activate-scripts checkmake check-mutable-globals check-dep-docs check-test-speed build-images push-images build-images-dry-run clean-images
|
.PHONY: all setup setup-ci setup-quality setup-release setup-image install update lint lint-all lint-dockerfiles test test-unit pytest-cov clean install-tools install-hooks activate-scripts checkmake check-mutable-globals check-dep-docs check-test-speed build-images push-images build-images-dry-run clean-images
|
||||||
|
|
||||||
PYTHON := python3
|
PYTHON := python3
|
||||||
VENV := .venv
|
VENV := .venv
|
||||||
@@ -96,9 +96,18 @@ create-pr: devx-create-pr
|
|||||||
push-with-pr: devx-push-with-pr
|
push-with-pr: devx-push-with-pr
|
||||||
git-push: devx-push
|
git-push: devx-push
|
||||||
|
|
||||||
lint-all: lint workflow-lint
|
lint-all: lint workflow-lint lint-dockerfiles
|
||||||
@echo "[lint-all] All linting checks passed."
|
@echo "[lint-all] All linting checks passed."
|
||||||
|
|
||||||
|
lint-dockerfiles:
|
||||||
|
@echo "[lint-dockerfiles] Linting Dockerfiles with hadolint..."
|
||||||
|
@if command -v hadolint >/dev/null 2>&1; then \
|
||||||
|
find docker -name 'Dockerfile*' -exec hadolint {} +; \
|
||||||
|
echo "[lint-dockerfiles] All Dockerfiles passed."; \
|
||||||
|
else \
|
||||||
|
echo "[lint-dockerfiles] hadolint not found — skipping (install with: pip install hadolint or download from GitHub)"; \
|
||||||
|
fi
|
||||||
|
|
||||||
test-unit: devx-test-unit
|
test-unit: devx-test-unit
|
||||||
|
|
||||||
pytest-cov: devx-pytest-cov
|
pytest-cov: devx-pytest-cov
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
|
|
||||||
FROM git.oblachno.oblachno.fyi/oblachno-oss/runner-images/ci-quality:latest
|
FROM git.oblachno.oblachno.fyi/oblachno-oss/runner-images/ci-quality:latest
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
|
||||||
# Install devx[release,molecule,deploy] from local source
|
# Install devx[release,molecule,deploy] from local source
|
||||||
COPY . /tmp/devx
|
COPY . /tmp/devx
|
||||||
RUN pip install --no-cache-dir /tmp/devx[release,molecule,deploy] \
|
RUN pip install --no-cache-dir /tmp/devx[release,molecule,deploy] \
|
||||||
|
|||||||
@@ -15,3 +15,8 @@ RUN pip install --no-cache-dir /tmp/devx[lint] \
|
|||||||
# Install CI/CD binary tools
|
# Install CI/CD binary tools
|
||||||
RUN python3 -m devx.tools.install_tools --tool actionlint \
|
RUN python3 -m devx.tools.install_tools --tool actionlint \
|
||||||
&& python3 -m devx.tools.install_checkmake
|
&& python3 -m devx.tools.install_checkmake
|
||||||
|
|
||||||
|
# Install hadolint (Dockerfile linter)
|
||||||
|
RUN curl -fsSL "https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64" \
|
||||||
|
-o /usr/local/bin/hadolint \
|
||||||
|
&& chmod +x /usr/local/bin/hadolint
|
||||||
|
|||||||
Reference in New Issue
Block a user