From b0f9bb8e2bf1807458ef17d34e71ee6a1e2999db Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 13 May 2024 09:42:51 +1000 Subject: [PATCH] Moved linting of container images in CI to take place before stack build. --- .circleci/config.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 30ac3670f..eaf6bd620 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -238,6 +238,13 @@ jobs: - v1.21.0-db10-{{ checksum "/tmp/db_cache_branch" }}-{{ checksum "/tmp/db_cache_fallback_yes" }}- #;> !PROVISION_USE_PROFILE + - run: + name: Lint Dockerfiles with Hadolint + command: | + for file in $(find . -name 'Dockerfile' -o -name '*.dockerfile'); do + echo "Linting ${file}" && cat "${file}" | docker run --rm -i hadolint/hadolint || [ "${DREVOPS_CI_HADOLINT_IGNORE_FAILURE:-0}" -eq 1 ] + done + - run: name: Login to container registry command: ./scripts/drevops/login-container-registry.sh @@ -259,13 +266,6 @@ jobs: if [ -n \"${GITHUB_TOKEN:-}\" ]; then export COMPOSER_AUTH='{\"github-oauth\": {\"github.com\": \"${GITHUB_TOKEN-}\"}}'; fi && \ COMPOSER_MEMORY_LIMIT=-1 composer --ansi install --prefer-dist" - - run: - name: Lint Dockerfiles with Hadolint - command: | - for file in $(find . -name 'Dockerfile' -o -name '*.dockerfile'); do - echo "Linting ${file}" && cat "${file}" | docker run --rm -i hadolint/hadolint || [ "${DREVOPS_CI_HADOLINT_IGNORE_FAILURE:-0}" -eq 1 ] - done - - run: name: Lint code with PHPCS command: docker compose exec -T cli vendor/bin/phpcs || [ "${DREVOPS_CI_PHPCS_IGNORE_FAILURE:-0}" -eq 1 ]