diff --git a/.circleci/config.yml b/.circleci/config.yml index 306af6ad1..b066ac88d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -269,9 +269,13 @@ job-build: &job-build docker compose exec -T cli php -d memory_limit=-1 vendor/bin/behat --colors --strict --rerun --profile="${DREVOPS_CI_BEHAT_PROFILE:-default}" || \ [ "${DREVOPS_CI_BEHAT_IGNORE_FAILURE:-0}" -eq 1 ] no_output_timeout: 30m - - run: - name: Audit code with shipshape - command: docker compose exec -T cli /usr/local/bin/shipshape -o junit > /app/.logs/test_results/shipshape-results.xml || [ "${DREVOPS_CI_SHIPSHAPE_IGNORE_FAILURE:-0}" -eq 1 ] + # Optionally run Shipshape audit. + - when: + condition: ${SHIPSHAPE_RUN_AUDIT:-0} + steps: + - run: + name: Audit code with shipshape + command: docker compose exec -T cli sh -c "/usr/local/bin/shipshape -o junit > /app/.logs/test_results/shipshape-results.xml" || [ "${DREVOPS_CI_SHIPSHAPE_IGNORE_FAILURE:-0}" -eq 1 ] - run: name: Process test logs and artifacts command: | @@ -366,7 +370,7 @@ jobs: environment: DRUPAL_PROFILE: govcms CIVICTHEME_SUBTHEME_ACTIVATION_SKIP: 1 - DREVOPS_CI_SHIPSHAPE_IGNORE_FAILURE: 1 + SHIPSHAPE_RUN_AUDIT: 1 DREVOPS_CI_DRUPAL_THEME_CONFIG_LINT_IGNORE_FAILURE: 1 DREVOPS_EXPORT_CODE_DIR: '/tmp/workspace/code_unused' <<: *job-build @@ -377,7 +381,7 @@ jobs: environment: DRUPAL_PROFILE: govcms DREVOPS_CI_DRUPAL_THEME_CONFIG_LINT_IGNORE_FAILURE: 1 - DREVOPS_CI_SHIPSHAPE_IGNORE_FAILURE: 1 + SHIPSHAPE_RUN_AUDIT: 1 DREVOPS_EXPORT_CODE_DIR: '/tmp/workspace/code_unused' <<: *job-build