-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
50 lines (45 loc) · 1.24 KB
/
.gitlab-ci.yml
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
42
43
44
45
46
47
48
49
50
default:
image:
name: redhat/ubi8
entrypoint: [""]
stages:
- deploy-aaa
- deploy-dns
- deploy-ntp
- deploy-snmp
- deploy-syslog
deploy-aaa:
stage: deploy-aaa
script:
- 'curl -kX POST https://192.168.6.100:443/api/v2/job_templates/18/launch/ -H "Authorization: Bearer $TOWER_TOKEN"'
only:
changes:
- "roles/config_aaa/**/*"
deploy-dns:
stage: deploy-dns
script:
- 'curl -kX POST https://192.168.6.100:443/api/v2/job_templates/41/launch/ -H "Authorization: Bearer $TOWER_TOKEN"'
only:
changes:
- "roles/config_dns/**/*"
deploy-ntp:
stage: deploy-ntp
script:
- 'curl -kX POST https://192.168.6.100:443/api/v2/job_templates/17/launch/ -H "Authorization: Bearer $TOWER_TOKEN"'
rules:
- if: $CI_COMMIT_BRANCH == 'master'
- if: $CI_COMMIT_TAG == 'ntp'
deploy-snmp:
stage: deploy-snmp
script:
- 'curl -kX POST https://192.168.6.100:443/api/v2/job_templates/29/launch/ -H "Authorization: Bearer $TOWER_TOKEN"'
only:
changes:
- "roles/config_snmp/**/*"
deploy-syslog:
stage: deploy-syslog
script:
- 'curl -kX POST https://192.168.6.100:443/api/v2/job_templates/23/launch/ -H "Authorization: Bearer $TOWER_TOKEN"'
only:
changes:
- "roles/config_syslog/**/*"