blob: e02747ac4cc157faf34ea83a8a02c658c578e297 (
plain)
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
|
---
- builder:
name: xtesting-ci-tests
builders:
- shell: |
set +x
sudo apt-get -o DPkg::Lock::Timeout=300 update
sudo DEBIAN_FRONTEND=noninteractive apt-get \
-o DPkg::Lock::Timeout=300 install python3-pip docker.io podman -y
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.17.0/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
kind delete clusters xtesting jenkins gitlab || true
sudo docker ps -aq |xargs sudo docker stop || true
sudo docker ps -aq |xargs sudo docker rm || true
sudo docker system prune -f --all || true
sudo rm -f /etc/systemd/system/docker.service.d/http-proxy.conf
sudo systemctl daemon-reload
sudo systemctl restart docker
sudo podman ps -aq |xargs sudo podman stop || true
sudo podman ps -aq |xargs sudo podman rm || true
sudo rm -rfv /data /tmp/xtesting*
sudo apt-get install ansible patch -y
rm -rf ~/.ansible/roles/collivier.xtesting
case {release} in
stable)
ansible-galaxy install -f collivier.xtesting ;;
*)
ansible-galaxy install -f git+https://github.com/collivier/ansible-role-xtesting.git,{release}
mv ~/.ansible/roles/ansible-role-xtesting ~/.ansible/roles/collivier.xtesting ;;
esac
(cd ~/.ansible/roles/collivier.xtesting; patch -p1 < tests/docker_config_json.patch)
ansible-galaxy collection install -f -r ~/.ansible/roles/collivier.xtesting/requirements.yml
ansible-playbook -vvvv ~/.ansible/roles/collivier.xtesting/tests/{playbook}.yml
- builder:
name: xtesting-ci-tests-remote
builders:
- shell: |
set +x
ssh opnfv@10.200.140.224 << EOF
sudo apt-get -o DPkg::Lock::Timeout=300 update
sudo DEBIAN_FRONTEND=noninteractive apt-get \
-o DPkg::Lock::Timeout=300 install python3-pip docker.io podman -y
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.17.0/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
kind delete clusters xtesting jenkins gitlab || true
sudo docker ps -aq |xargs sudo docker stop || true
sudo docker ps -aq |xargs sudo docker rm || true
sudo docker system prune -f --all || true
sudo rm -f /etc/systemd/system/docker.service.d/http-proxy.conf
sudo systemctl daemon-reload
sudo systemctl restart docker
sudo podman ps -aq |xargs sudo podman stop || true
sudo podman ps -aq |xargs sudo podman rm || true
sudo rm -rfv /data /tmp/xtesting*
EOF
sudo apt-get install ansible patch -y
rm -rf ~/.ansible/roles/collivier.xtesting
case {release} in
stable)
ansible-galaxy install -f collivier.xtesting ;;
*)
ansible-galaxy install -f git+https://github.com/collivier/ansible-role-xtesting.git,{release}
mv ~/.ansible/roles/ansible-role-xtesting ~/.ansible/roles/collivier.xtesting ;;
esac
(cd ~/.ansible/roles/collivier.xtesting; patch -p1 < tests/docker_config_json.patch)
ansible-galaxy collection install -f -r ~/.ansible/roles/collivier.xtesting/requirements.yml
sed -i "s/127.0.0.1/10.200.140.224/g" ~/.ansible/roles/collivier.xtesting/tests/{playbook}.yml
echo 10.200.140.224 ansible_host=10.200.140.224 ansible_user=opnfv > /tmp/inventory
ansible-playbook -i /tmp/inventory -vvvv ~/.ansible/roles/collivier.xtesting/tests/{playbook}.yml
- parameter:
name: xtesting-ci-node
parameters:
- label:
name: node
default: '{node}'
- job-template:
name: 'xtesting-ci-tests-{release}-{playbook}'
triggers:
- timed: '@daily'
parameters:
- xtesting-ci-node:
node: '{node}'
properties:
- build-blocker:
use-build-blocker: true
blocking-level: 'NODE'
blocking-jobs:
- '^xtesting-ci-tests-.*$'
builders:
- xtesting-ci-tests:
playbook: '{playbook}'
release: '{release}'
- job-template:
name: 'xtesting-ci-tests-remote-{release}-{playbook}'
triggers:
- timed: '@daily'
parameters:
- xtesting-ci-node:
node: '{node}'
properties:
- build-blocker:
use-build-blocker: true
blocking-level: 'NODE'
blocking-jobs:
- '^xtesting-ci-tests-.*$'
builders:
- xtesting-ci-tests-remote:
playbook: '{playbook}'
release: '{release}'
- _playbook: &playbook
name: 'playbook'
playbook:
- all
- podman
- proxy
- proxy2
- radosgw
- nexus
- repo
- twice
- macro
- branch
- jjb
- https
- https2
- gitlab.insert
- jenkins_kind
- jenkins_kind2
- gitlab_kind
- chainedci
- kubernetes0
- kubernetes1
- kubernetes2
- proxy_kubernetes
- proxy_kubernetes2
- k8s_jenkins_kind0
- k8s_jenkins_kind1
- k8s_jenkins_kind2
- k8s_jenkins_kind3
- k8s_gitlab0
- k8s_gitlab1
- k8s_gitlab_kind0
- k8s_gitlab_kind1
- k8s_gitlab_kind2
- k8s_gitlab_kind3
- project:
name: xtesting-ci-tests
<<: *playbook
node: xtestingci
release:
- stable
- master
jobs:
- 'xtesting-ci-tests-{release}-{playbook}'
- project:
name: xtesting-ci-tests-remote
<<: *playbook
node: xtesting
release:
- stable
- master
jobs:
- 'xtesting-ci-tests-remote-{release}-{playbook}'
- view:
name: xtesting-ci
view-type: list
columns:
- status
- weather
- job
- last-success
- last-failure
- last-duration
regex: ^xtesting-ci-tests-.*$
|