summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorjerome <jerome@xlinfo.fr>2023-05-05 17:07:48 +0200
committerjerome <jerome@xlinfo.fr>2023-05-05 17:07:48 +0200
commit10468afe36a0fc534bc889c4bf6aa1f28588f66b (patch)
tree3fcff19884285813e341dbfb46e812cc44a84598 /.gitlab-ci.yml
downloadhelloworld-10468afe36a0fc534bc889c4bf6aa1f28588f66b.tar.gz
helloworld-10468afe36a0fc534bc889c4bf6aa1f28588f66b.zip
commit initial
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml51
1 files changed, 51 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..81fdb03
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,51 @@
+# You can override the included template(s) by including variable overrides
+# See https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
+# Note that environment variables can be set in several places
+# See https://docs.gitlab.com/ee/ci/variables/#priority-of-environment-variables
+
+workflow:
+ rules:
+ - if: '$CI_PIPELINE_SOURCE == "web"'
+
+stages:
+- test
+- run
+- deploy
+
+syntax-check-job:
+ stage: test
+ tags:
+ - loufux-docker
+ image: ansible
+ script:
+ - ansible-playbook tests/test.yml -i tests/inventory --syntax-check
+
+lint-test-job:
+ stage: test
+ 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
+
+
+run-job:
+ stage: run
+ tags:
+ - loufux-docker
+ image: ansible
+ script:
+ - ansible-playbook tests/test.yml -i 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