-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
41 lines (36 loc) · 828 Bytes
/
.gitlab-ci.yml
File metadata and controls
41 lines (36 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
stages:
- test
- deploy
test_deploy:
stage: test
before_script:
- sudo apt install yamllint --yes
script:
- cd /home/ifilyanin/Desktop/multivendor_module_ansible
- git pull https://adeptvin1:Adeptvin3@gitlab.com/adeptvin1/multivendor_module_ansible.git
tags:
- ansible_test
test_playbook_lint:
stage: test
script:
- yamllint $CI_COMMIT_TITLE && echo "OK"
rules:
- if: '$CI_COMMIT_TITLE != ".gitlab-ci.yml"'
- if: '$CI_COMMIT_TITLE == "*_playbook.yml"'
tags:
- ansible_test
test_playbook_play:
stage: test
script:
- sudo ansible-playbook $CI_COMMIT_TITLE
rules:
- if: '$CI_COMMIT_TITLE != ".gitlab-ci.yml"'
- if: '$CI_COMMIT_TITLE == "*_playbook.yml"'
tags:
- ansible_test
second:
stage: deploy
script:
- echo $CI_COMMIT_REF_SLUG
tags:
- ansible_test