-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
64 lines (60 loc) · 1.5 KB
/
.gitlab-ci.yml
File metadata and controls
64 lines (60 loc) · 1.5 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
image: mtarking/nac-vxlan:0.5.1rc1
stages:
- validate
- deploy
- test
variables:
ND_HOST:
description: "Cisco ND HOST"
ND_DOMAIN:
description: "Cisco ND Domain"
ND_USERNAME:
description: "Cisco ND Username"
ND_PASSWORD:
description: "Cisco ND Password"
DC_VXLAN_SCHEMA:
description: "Path to the schema file"
DC_VXLAN_RULES:
description: "Path to the rules file"
NDFC_SW_USERNAME:
description: "Cisco NDFC Switch Username"
NDFC_SW_PASSWORD:
description: "Cisco NDFC Switch Password"
validate:
stage: validate
rules:
- if: $CI_COMMIT_TAG == null
script:
- set -o pipefail && ansible-playbook -i inventory.yaml validate.yaml |& tee validate_output.txt
artifacts:
paths:
- validate_output.txt
cache: []
deploy:
stage: deploy
dependencies:
- validate
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual
script:
- set -o pipefail && ansible-playbook -i inventory.yaml vxlan.yaml |& tee deploy_output.txt
test-integration:
stage: test
dependencies:
- deploy
needs:
- deploy
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script:
- set -o pipefail && nac-test -d ./host_vars/nac-fabric1 -d ./group_vars/ndfc/defaults.yaml -t ./tests/templates -o ./tests/results/ndfc |& tee test_output.txt
artifacts:
when: always
paths:
- tests/results/ndfc/*.html
- tests/results/ndfc/xunit.xml
- test_output.txt
reports:
junit: tests/results/ndfc/xunit.xml