summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjerome <jerome@xlinfo.fr>2023-05-06 09:02:32 +0200
committerjerome <jerome@xlinfo.fr>2023-05-06 09:02:32 +0200
commit7d1116115438272eb88eac3d96ecc9d88eb6124c (patch)
tree905086effd9024f9b166e8dc235359f2e2c095fe
parentef626864fa3c481f3f375655be59c22491da47fc (diff)
downloadhelloworld-7d1116115438272eb88eac3d96ecc9d88eb6124c.tar.gz
helloworld-7d1116115438272eb88eac3d96ecc9d88eb6124c.zip
update .gitlab-ci.yml
-rw-r--r--.gitlab-ci.yml25
-rw-r--r--defaults/main.yml2
-rw-r--r--tests/inventory2
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