-
Notifications
You must be signed in to change notification settings - Fork 50
187 lines (184 loc) · 6.87 KB
/
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
---
name: CI
on:
workflow_dispatch:
pull_request:
branches:
- cml
env:
CML_HOST: '${{ secrets.CML_HOST }}'
CML_USERNAME: '${{ secrets.CML_USERNAME }}'
CML_PASSWORD: '${{ secrets.CML_PASSWORD }}'
VMANAGE_ORG: '${{ secrets.VMANAGE_ORG }}'
VMANAGE1_IP: '${{ secrets.VMANAGE1_IP }}'
VSMART1_IP: '${{ secrets.VSMART1_IP }}'
VBOND1_IP: '${{ secrets.VBOND1_IP }}'
HQ_EDGE1_IP: '${{ secrets.HQ_EDGE1_IP }}'
SITE1_EDGE1_IP: '${{ secrets.SITE1_EDGE1_IP }}'
SITE2_EDGE1_IP: '${{ secrets.SITE2_EDGE1_IP }}'
VPN0_GATEWAY: '${{ secrets.VPN0_GATEWAY }}'
VMANAGE_NODEDEF: 'cat-sdwan-manager'
VSMART_NODEDEF: 'cat-sdwan-controller'
VEDGE_NODEDEF: 'vEdge'
CEDGE_NODEDEF: 'cEdge'
CSR1000V_IMAGE: 'csr1000v-170304a'
UBUNTU_IMAGE: 'ubuntu-20-04-20210927'
ANSIBLE_VAULT_PASSWORD: '${{ secrets.ANSIBLE_VAULT_PASSWORD }}'
jobs:
lint:
runs-on: self-hosted
steps:
- name: Checkout Inventory
uses: actions/checkout@v3
- name: Run ansible-lint
run: ansible-lint
# test_19_2_1:
# runs-on: self-hosted
# concurrency: hq2
# needs: lint
# env:
# CML_LAB: 'sdwan-devops-hq2'
# VIPTELA_VERSION: '19.2.1'
# CLOUDINIT_TYPE: 'v1'
# CEDGE_IMAGE: 'cEdge-17.3.8'
# CSR1000V_IMAGE: 'csr1000v-170101'
# steps:
# - name: Checkout Inventory
# uses: actions/checkout@v2
# with:
# submodules: recursive
# - name: Clean Existing Deployment
# run: ansible-playbook -i inventory/hq2 clean-cml.yml --tags delete
# - name: Install Licenses
# run: |
# mkdir licenses
# echo $ANSIBLE_VAULT_PASSWORD > vault-password-file
# ansible-vault decrypt --vault-password-file vault-password-file files/serialFile.viptela --output licenses/serialFile.viptela
# - name: Build CA
# run: ansible-playbook -i inventory/hq2 build-ca.yml
# - name: Build Simulation
# run: ansible-playbook -i inventory/hq2 build-cml.yml
# - name: Configure Control Plane
# run: ansible-playbook -i inventory/hq2 config-sdwan.yml
# - name: Deploy Edges
# run: ansible-playbook -i inventory/hq2 deploy-cml.yml
# - name: Wait for Edges to Sync
# run: ansible-playbook -i inventory/hq2 waitfor-sync.yml
# - name: Check SD-WAN
# run: ansible-playbook -i inventory/hq2 check-sdwan.yml
# - name: Cleanup
# run: ansible-playbook -i inventory/hq2 clean-cml.yml
# test_20_3_2:
# runs-on: self-hosted
# concurrency: hq2
# needs: lint
# env:
# CML_LAB: 'sdwan-devops-hq2'
# VIPTELA_VERSION: '20.3.2'
# CLOUDINIT_TYPE: 'v1'
# CEDGE_IMAGE: 'cEdge-17.3.8'
# CSR1000V_IMAGE: 'csr1000v-170101'
# steps:
# - name: Checkout Inventory
# uses: actions/checkout@v2
# with:
# submodules: recursive
# - name: Clean Existing Deployment
# run: ansible-playbook -i inventory/hq2 clean-cml.yml --tags delete
# - name: Install Licenses
# run: |
# mkdir licenses
# echo $ANSIBLE_VAULT_PASSWORD > vault-password-file
# ansible-vault decrypt --vault-password-file vault-password-file files/serialFile.viptela --output licenses/serialFile.viptela
# - name: Build CA
# run: ansible-playbook -i inventory/hq2 build-ca.yml
# - name: Build Simulation
# run: ansible-playbook -i inventory/hq2 build-cml.yml
# - name: Configure Control Plane
# run: ansible-playbook -i inventory/hq2 config-sdwan.yml
# - name: Deploy Edges
# run: ansible-playbook -i inventory/hq2 deploy-cml.yml
# - name: Wait for Edges to Sync
# run: ansible-playbook -i inventory/hq2 waitfor-sync.yml
# - name: Check SD-WAN
# run: ansible-playbook -i inventory/hq2 check-sdwan.yml
# - name: Cleanup
# run: ansible-playbook -i inventory/hq2 clean-cml.yml
# test_20_7_1:
# runs-on: self-hosted
# concurrency: hq2
# needs: lint
# env:
# CML_LAB: 'sdwan-devops-hq2'
# VIPTELA_VERSION: '20.7.1'
# CLOUDINIT_TYPE: 'v2'
# CEDGE_SDWAN_IMAGE: 'cEdge-17.3.8'
# CSR1000V_IMAGE: 'csr1000v-170101'
# steps:
# - name: Checkout Inventory
# uses: actions/checkout@v2
# with:
# submodules: recursive
# - name: Clean Existing Deployment
# run: ansible-playbook -i inventory/hq2 clean-cml.yml
# - name: Install Licenses
# run: |
# mkdir licenses
# echo $ANSIBLE_VAULT_PASSWORD > vault-password-file
# ansible-vault decrypt --vault-password-file vault-password-file files/serialFile.viptela --output licenses/serialFile.viptela
# - name: Build CA
# run: ansible-playbook -i inventory/hq2 build-ca.yml
# - name: Build Simulation
# run: ansible-playbook -i inventory/hq2 build-cml.yml
# - name: Configure Control Plane
# run: ansible-playbook -i inventory/hq2 config-sdwan.yml
# - name: Deploy Edges
# run: ansible-playbook -i inventory/hq2 deploy-cml.yml
# - name: Wait for Edges to Sync
# run: ansible-playbook -i inventory/hq2 waitfor-sync.yml
# - name: Check SD-WAN
# run: ansible-playbook -i inventory/hq2 check-sdwan.yml
# - name: Cleanup
# run: ansible-playbook -i inventory/hq2 clean-cml.yml
test_20_9_4:
runs-on: self-hosted
concurrency: hq1
needs: lint
env:
CML_LAB: sdwan-devops-hq2
VIPTELA_VERSION: '20.9.4'
CLOUDINIT_TYPE: v2
VMANAGE_NODEDEF: cat-sdwan-manager
VSMART_NODEDEF: cat-sdwan-controller
VEDGE_NODEDEF: vEdge
CEDGE_NODEDEF: cEdge
VMANAGE_IMAGE: sdwan-manager-20.9.4
VSMART_IMAGE: sdwan-controller-20.9.4
VEDGE_IMAGE: vEdge-20.9.4
CEDGE_IMAGE: cEdge-17.3.8
steps:
- name: Checkout Inventory
uses: actions/checkout@v2
with:
submodules: recursive
- name: Clean Existing Deployment
run: ansible-playbook -i inventory/hq2 clean-cml.yml
- name: Install Licenses
run: |
mkdir licenses
echo $ANSIBLE_VAULT_PASSWORD > vault-password-file
ansible-vault decrypt --vault-password-file vault-password-file files/serialFile.viptela --output licenses/serialFile.viptela
- name: Build CA
run: ansible-playbook -i inventory/hq2 build-ca.yml
- name: Build Simulation
run: ansible-playbook -i inventory/hq2 build-cml.yml
- name: Configure Control Plane
run: ansible-playbook -i inventory/hq2 config-sdwan.yml
- name: Deploy Edges
run: ansible-playbook -i inventory/hq2 deploy-cml.yml
- name: Wait for Edges to Sync
run: ansible-playbook -i inventory/hq2 waitfor-sync.yml
- name: Check SD-WAN
run: ansible-playbook -i inventory/hq2 check-sdwan.yml
- name: Cleanup
run: ansible-playbook -i inventory/hq2 clean-cml.yml