diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9926a3448d6f4df8eeb5667ddd4dd24ae80469b3..001f28f175ff32f8e8b1e5f311b03e21ec3461ad 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