From 7d1116115438272eb88eac3d96ecc9d88eb6124c Mon Sep 17 00:00:00 2001 From: jerome Date: Sat, 6 May 2023 09:02:32 +0200 Subject: update .gitlab-ci.yml --- .gitlab-ci.yml | 25 ++++++++++++++----------- defaults/main.yml | 2 +- tests/inventory | 2 +- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7fa3b11..b430799 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,27 +8,30 @@ workflow: - if: '$CI_PIPELINE_SOURCE == "web"' stages: +- build - test -lint-test-job: - stage: test +build-job: + stage: build tags: - loufux-docker image: ansible script: - - ansible-lint -p tests/test.yml | ansible-lint-junit -o ansible-lint.xml || true - artifacts: - reports: - junit: ansible-lint.xml - + - ansible-galaxy install git+https://gitlab.com/loufux/ansible/helloworld.git + - ansible-galaxy list + - ansible-playbook ~/.ansible/roles/helloworld/tests/test.yml + artifact: + - path: ~/.ansible/roles/helloworld -deploy-check-job: +lint-test-job: stage: test tags: - loufux-docker image: ansible script: - - ansible-galaxy install git+https://gitlab.com/loufux/ansible/helloworld.git - - ansible-galaxy list - - ansible-playbook ~/.ansible/roles/helloworld/tests/test.yml -i ~/.ansible/roles/helloworld/tests/inventory + - ansible-lint -p ~/.ansible/roles/helloworld/tests/test.yml | ansible-lint-junit -o ansible-lint.xml || true + artifacts: + reports: + junit: ansible-lint.xml + diff --git a/defaults/main.yml b/defaults/main.yml index 75f3b1b..c8e4949 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,5 @@ --- # defaults file for helloworld -world : "world" +world: "world" diff --git a/tests/inventory b/tests/inventory index 49d4fe2..878877b 100644 --- a/tests/inventory +++ b/tests/inventory @@ -1,2 +1,2 @@ -localhost ansible_connection=local +localhost -- cgit v1.2.3