-
Notifications
You must be signed in to change notification settings - Fork 1
/
.drone.yml
76 lines (64 loc) · 2.06 KB
/
.drone.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
---
kind: pipeline
type: exec
name: ni-testbed
steps:
- name: submodule
commands:
- git submodule update --init --recursive
- name: cleanup previous build if exist
commands:
- ./scripts/virsh_clean.sh
- name: Config test parameters and create internet access to test subnets
commands:
- ./scripts/test_config.sh
- name: install ansible
commands:
- pip install --user ansible==2.7
- name: install vagrant plugin
commands:
- vagrant plugin list
- vagrant plugin install vagrant-libvirt
- name: deploy devstack rocky on vagrant
commands:
- vagrant --ci -- up --provider=libvirt --no-parallel
- ansible-playbook -i inventories/vagrant_ci bootstrap.yml
- ansible-playbook -i inventories/vagrant_ci openstack.yml
- name: deploy devstack rocky with dpdk on vagrant
commands:
- vagrant --ci -- destroy -f
- vagrant --ci -- up --provider=libvirt --no-parallel
- ansible-playbook -i inventories/vagrant_dpdk_ci bootstrap.yml
- ansible-playbook -i inventories/vagrant_dpdk_ci openstack.yml
- name: deploy devstack train on vagrant
commands:
- vagrant --ci -- destroy -f
- sed -i "s|stable/rocky|stable/train|g" inventories/vagrant_ci
- vagrant --ci -- up --provider=libvirt --no-parallel
- ansible-playbook -i inventories/vagrant_ci bootstrap.yml
- ansible-playbook -i inventories/vagrant_ci openstack.yml
- name: final cleanup
commands:
- vagrant --ci -- destroy -f
- name: notify slack if build success
environment:
SLACK_HOOK_URL:
from_secret: slack_hook_url
commands:
- curl -X POST -H 'Content-type:application/json' --data '{"channel":"#ci_status", "username":"ci_report",
"text":"_${DRONE_REPO_NAME}__ status is __success__"}'
$SLACK_HOOK_URL
when:
status:
- success
- name: notify slack if build fail
environment:
SLACK_HOOK_URL:
from_secret: slack_hook_url
commands:
- curl -X POST -H 'Content-type:application/json' --data '{"channel":"#ci_status", "username":"ci_report",
"text":"_${DRONE_REPO_NAME}__ status is __failure__"}'
$SLACK_HOOK_URL
when:
status:
- failure