From 078cf0e0e8acea66d06df05f4682fec63b4c64cc Mon Sep 17 00:00:00 2001 From: Karel van Klink <karel.vanklink@geant.org> Date: Mon, 8 Jan 2024 10:39:38 +0000 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9926a344..001f28f1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,7 @@ variables: stages: # List of stages for jobs, and their order of execution - setup - - test + - linting - build - publish @@ -36,13 +36,20 @@ stages: # List of stages for jobs, and their order of execution # only: # - main -lint-test-job: # This job also runs in the test stage. - stage: test # It can run at the same time as unit-test-job (in parallel). +ansible-lint: + stage: linting + image: registry.gitlab.com/pipeline-components/ansible-lint:latest script: - - /home/gitlab-runner/.local/bin/ansible-lint --exclude .gitlab-ci.yml + - ansible-lint -f codeclimate | python -m json.tool | tee "${CI_PROJECT_DIR}/codeclimate-results.json" + artifacts: + name: "$CI_JOB_NAME artifacts from $CI_PROJECT_NAME on $CI_COMMIT_REF_SLUG" + reports: + codequality: + - "${CI_PROJECT_DIR}/codeclimate-results.json" + paths: + - "${CI_PROJECT_DIR}/codeclimate-results.json" tags: - - ansible - - lab + - docker-executor install-dependencies: stage: setup -- GitLab