From 64635903ccd729f492f139a0899529e520c68b80 Mon Sep 17 00:00:00 2001 From: jerome Date: Fri, 5 May 2023 17:32:24 +0200 Subject: update .gitlab-ci.yml --- .gitlab-ci.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e8e3dbb..57f9fc3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,17 +8,26 @@ workflow: - if: '$CI_PIPELINE_SOURCE == "web"' stages: +- build - test -- run - deploy +build-job: + stage: build + tags: + - loufux-docker + image: ansible + script: + - ansible-galaxy install git+https://gitlab.com/loufux/ansible/helloworld.git + - ansible-galaxy list + syntax-check-job: stage: test tags: - loufux-docker image: ansible script: - - ansible-playbook tests/test.yml -i tests/inventory --syntax-check ||true + - ansible-playbook helloworld/tests/test.yml -i helloworld/tests/inventory --syntax-check ||true lint-test-job: stage: test @@ -26,7 +35,7 @@ lint-test-job: - loufux-docker image: ansible script: - - ansible-lint -p tests/test.yml | ansible-lint-junit -o ansible-lint.xml || true + - ansible-lint -p helloworld/tests/test.yml | ansible-lint-junit -o ansible-lint.xml || true artifacts: reports: junit: ansible-lint.xml @@ -38,14 +47,5 @@ run-job: - loufux-docker image: ansible script: - - ansible-playbook tests/test.yml -i tests/inventory + - ansible-playbook helloworld/tests/test.yml -i helloworld/tests/inventory -deploy-job: - stage: deploy - tags: - - loufux-docker - image: ansible - script: - - ansible-galaxy install git+https://gitlab.com/loufux/ansible/helloworld.git --roles-path /etc/ansible/roles/ - - ansible-galaxy info helloworld - - ansible-galaxy list -- cgit v1.2.3