forked from vmware-archive/vsphere-storage-for-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
177 lines (162 loc) · 5.16 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
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
clone:
path: github.com/vmware/docker-volume-vsphere
tags: true
build:
serialize_branches:
image: &build_cnt cnastorage/vibauthor-and-go:0.12
environment: &setup_env
- DRONE_TOKEN=$$DRONE_TOKEN
- DRONE_SERVER=$$DRONE_SERVER
- GOVC_USERNAME=$$CI_BASE_VMWARE_ESX_USER
- GOVC_PASSWORD=$$CI_BASE_VMWARE_ESX_PASS
- GOVC_USERNAME_ESX=$$CI_VMWARE_ESX_USER
- GOVC_PASSWORD_ESX=$$CI_VMWARE_ESX_PASS
- GOVC_INSECURE=1
- GOVC_URL=$$CI_BASE_ESX_IP
- TEST_URL_ARRAY=$$CI_ESX_IP_6_0
- ESX_6_0=$$CI_ESX_NAME_6_0
- ESX_6_5=$$CI_ESX_NAME_6_5
- GOVC_URL_6_0=$$CI_ESX_IP_6_0
- GOVC_URL_6_5=$$CI_ESX_IP_6_5
- SSH_KEY_OPT=-i /drone/src/github.com/vmware/docker-volume-vsphere/key
- GOVC_GET_IP=govc vm.ip -a -v4
- KEY=$$KEY
- DOCKER_HUB_REPO=cnastorage
- VERSION_TAG=latest
- EXTRA_TAG=-CI
- ESX_6_0=$$CI_ESX_NAME_6_0
- ESX_6_5=$$CI_ESX_NAME_6_5
commands: &serialize_cmd
- misc/drone-scripts/validate-and-serialize.sh
when: &branches
event: [push]
branch: [master, runci/*]
serialize_events:
image: *build_cnt
environment: *setup_env
commands: *serialize_cmd
when: &events
event: [pull_request, tag]
build_branches:
image: *build_cnt
environment: *setup_env
commands: &build_cmd
- if [ "$TAG" != "" ]; then export PKG_VERSION=$TAG; fi
- go get github.com/golang/lint/golint
- go get -u gopkg.in/check.v1
- make -s build
- echo $KEY | base64 -d > /drone/src/github.com/vmware/docker-volume-vsphere/key
- chmod 0600 /drone/src/github.com/vmware/docker-volume-vsphere/key
when: *branches
build_events:
image: *build_cnt
environment: *setup_env
commands: *build_cmd
when: *events
pylint_branches:
image: &pylint_cnt cnastorage/pylint
commands: &pylint_cmd
- make -s pylint
when: *branches
pylint_events:
image: *pylint_cnt
commands: *pylint_cmd
when: *events
package_branches:
image: &package_cnt cnastorage/fpm
commands: &package_cmd
- if [ "$TAG" != "" ]; then export PKG_VERSION=$TAG; fi
- make -s deb rpm
when: *branches
package_events:
image: *package_cnt
commands: *package_cmd
when: *events
setup_events:
image: *build_cnt
environment: *setup_env
commands: &setup_cmd
- misc/drone-scripts/setup.sh
when: *events
setup_branches:
image: *build_cnt
environment: *setup_env
commands: *setup_cmd
when: *branches
test_branches:
image: *build_cnt
privileged: true
environment: *setup_env
commands: &test_cmd
- GOVC_USERNAME=$GOVC_USERNAME_ESX
- GOVC_PASSWORD=$GOVC_PASSWORD_ESX
- if [ "$TAG" != "" ]; then export PKG_VERSION=$TAG; fi
- #
- echo "=> Build and push vDVS managed plugin" `date` > /dev/null
- #
- export GOVC_URL=$GOVC_URL_6_5
- export VM1=`$GOVC_GET_IP photon.vmfs`
- export VM2=`$GOVC_GET_IP Ubuntu.16.10`
- #
- export MANAGER1=$VM1
- export WORKER1=$VM2
- export WORKER2=`$GOVC_GET_IP Ubuntu.14.04`
- #
- export CI_NODE4=`$GOVC_GET_IP photon.vsan`
- #
- ./misc/drone-scripts/deploy-and-test-wrapper.sh pluginSanityCheck $GOVC_URL_6_5 $VM1 $VM2 $$BUILD_NUMBER installbuilds < /dev/null
- #
- echo "=> Running tests on ESX_6.5" `date` > /dev/null
- #
- ./misc/drone-scripts/deploy-and-test-wrapper.sh runtests $GOVC_URL_6_5 $VM1 $VM2 $$BUILD_NUMBER < /dev/null
- #
- echo "=> Running tests on VSAN ESX_6.5" `date` > /dev/null
- #
- export VM1=$CI_NODE4
- export VM2=$WORKER2
- ./misc/drone-scripts/deploy-and-test-wrapper.sh runtests $GOVC_URL_6_5 $VM1 $VM2 $$BUILD_NUMBER < /dev/null
- #
- echo "=> Capturing coverage on ESX_6.5" `date` > /dev/null
- #
- ./misc/drone-scripts/deploy-and-test-wrapper.sh coverage $GOVC_URL_6_5 < /dev/null
- #
- echo "=> Running tests on ESX_6.0" `date` > /dev/null
- #
- export GOVC_URL=$GOVC_URL_6_0
- export VM1=`$GOVC_GET_IP photon.ga.vmfs`
- export VM2=`$GOVC_GET_IP Ubuntu.1404.vmfs`
- #
- export MANAGER1=$VM1
- export WORKER1=$VM2
- export WORKER2=`$GOVC_GET_IP Ubuntu.1404.vsan`
- #
- export CI_NODE4=`$GOVC_GET_IP photon.ga.vsan`
- #
- ./misc/drone-scripts/deploy-and-test-wrapper.sh runtests $GOVC_URL $VM1 $VM2 $$BUILD_NUMBER installbuilds < /dev/null
- #
- #echo "=> Running tests on VSAN ESX_6.0" `date` > /dev/null
- echo "=> Tests are disabled for VSAN ESX_6.0 until we fix Git Issue 1057" `date` > /dev/null
- #
- #export VM1=$CI_NODE4
- #export VM2=$WORKER2
- #./misc/drone-scripts/deploy-and-test-wrapper.sh runtests $GOVC_URL $VM1 $VM2 $$BUILD_NUMBER < /dev/null
when: *branches
test_events:
image: *build_cnt
privileged: true
environment: *setup_env
commands: *test_cmd
when: *events
matrix:
GO_VERSION:
- 1.6
publish:
github_release:
api_key: $$GITHUB_TOKEN
files:
- build/*.deb
- build/*.rpm
- build/*.vib
- build/*.zip
when:
event: tag