forked from vmware/vic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
247 lines (232 loc) · 7.34 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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# After any change to this file you MUST re-sign and checkin the .drone.yml.sig
# When you are ready to submit a pull request, you must regenerate .drone.yml.sig for the vmware/vic repo:
# $ export DRONE_SERVER=https://ci.vcna.io
# $ export DRONE_TOKEN=<token>
# $ drone sign vmware/vic
# The secrets file is in our local git repo. Ask mhagen for access.
---
workspace:
base: /go
path: src/github.com/vmware/vic
pipeline:
clone:
image: plugins/git
tags: true
# dont clone submodules
recursive: false
wait-for-build:
image: harbor.ci.drone.local/library/vic-integration-test:1.36
pull: true
environment:
BIN: bin
GOPATH: /go
SHELL: /bin/bash
TEST_URL_ARRAY: ${TEST_URL_ARRAY}
DRONE_SERVER: ${DRONE_SERVER}
DRONE_TOKEN: ${DRONE_TOKEN}
commands:
- tests/wait_until_previous_builds_complete.sh
vic-engine:
image: harbor.ci.drone.local/library/vic-integration-test:1.36
pull: true
environment:
BIN: bin
GOPATH: /go
SHELL: /bin/bash
TEST_URL_ARRAY: ${TEST_URL_ARRAY}
TEST_USERNAME: ${TEST_USERNAME}
TEST_PASSWORD: ${TEST_PASSWORD}
REGISTRY_PASSWORD: ${REGISTRY_PASSWORD}
BUILD_NUMBER: ${DRONE_BUILD_NUMBER}
COMMIT: ${DRONE_COMMIT}
commands:
- make mark
- make all
- make sincemark
- make mark
- echo `ls vendor/github.com/vmware/govmomi/vim25/methods`
- echo `ls vendor/github.com/vmware/govmomi/vim25/types`
- echo `ls vendor/github.com/docker/docker/vendor/github.com/opencontainers/runc/libcontainer/system`
- export VIC_ESX_URL_ARRAY="`tests/get_test_url.sh`"
- make test
- make sincemark
when:
status: success
vic-integration-test-on-pr:
image: harbor.ci.drone.local/library/vic-integration-test:1.36
pull: true
privileged: true
environment:
BIN: bin
GOPATH: /go
SHELL: /bin/bash
LOG_TEMP_DIR: install-logs
GITHUB_AUTOMATION_API_KEY: ${GITHUB_AUTOMATION_API_KEY}
DRONE_SERVER: ${DRONE_SERVER}
DRONE_TOKEN: ${DRONE_TOKEN}
DRONE_MACHINE: ${DRONE_MACHINE}
TEST_URL_ARRAY: ${TEST_URL_ARRAY}
TEST_USERNAME: ${TEST_USERNAME}
TEST_PASSWORD: ${TEST_PASSWORD}
REGISTRY_PASSWORD: ${REGISTRY_PASSWORD}
TEST_DATASTORE: ${TEST_DATASTORE}
TEST_TIMEOUT: ${TEST_TIMEOUT}
REPORTING_SERVER_URL: ${REPORTING_SERVER_URL}
GOVC_INSECURE: true
GOVC_USERNAME: ${TEST_USERNAME}
GOVC_PASSWORD: ${TEST_PASSWORD}
GOVC_DATASTORE: ${TEST_DATASTORE}
GS_PROJECT_ID: ${GS_PROJECT_ID}
GS_CLIENT_EMAIL: ${GS_CLIENT_EMAIL}
GS_PRIVATE_KEY: ${GS_PRIVATE_KEY}
DOMAIN: ${CI_DOMAIN}
SYSLOG_SERVER: ${SYSLOG_SERVER}
SYSLOG_USER: ${SYSLOG_USER}
SYSLOG_PASSWD: ${SYSLOG_PASSWD}
commands:
- . ./tests/ci-env.sh # set CI env variable values
- make mark
- tests/integration-test.sh
- make sincemark
volumes:
- /tmp
- /home/vic:/ci
when:
status: success
vic-ui:
image: harbor.ci.drone.local/library/vic-integration-test:1.36
pull: true
environment:
BUILD_NUMBER: ${DRONE_BUILD_NUMBER}
BIN: bin
GS_PROJECT_ID: ${GS_PROJECT_ID}
GS_CLIENT_EMAIL: ${GS_CLIENT_EMAIL}
GS_PRIVATE_KEY: ${GS_PRIVATE_KEY}
commands:
- make mark
- ui/build-ui-plugins.sh
- make sincemark
when:
status: success
bundle:
image: harbor.ci.drone.local/library/golang:1.8
pull: true
environment:
BIN: bin
BIN_TEMP_DIR: bin/vic
GOPATH: /go
SHELL: /bin/bash
commands:
- make mark
- rm -rf $BIN_TEMP_DIR
- mkdir -p $BIN_TEMP_DIR/ui
- cp -rf ui/installer/* $BIN_TEMP_DIR/ui
- cp LICENSE $BIN_TEMP_DIR
- cp doc/bundle/README $BIN_TEMP_DIR
- cp $BIN/vic-machine* $BIN_TEMP_DIR
- cp $BIN/vic-ui* $BIN_TEMP_DIR
- cp $BIN/appliance.iso $BIN_TEMP_DIR
- cp $BIN/bootstrap.iso $BIN_TEMP_DIR
- tar czvf $BIN/vic_${DRONE_BUILD_NUMBER}.tar.gz -C $BIN vic
- shasum -a 256 $BIN/vic_${DRONE_BUILD_NUMBER}.tar.gz
- shasum -a 1 $BIN/vic_${DRONE_BUILD_NUMBER}.tar.gz
- md5sum $BIN/vic_${DRONE_BUILD_NUMBER}.tar.gz
- du -ks $BIN/vic_${DRONE_BUILD_NUMBER}.tar.gz | awk '{print $1 / 1024}' | { read x; echo $x MB; }
- mkdir bundle
- mkdir bundle-release
- cp $BIN/vic_${DRONE_BUILD_NUMBER}.tar.gz bundle
- cp $BIN/vic_${DRONE_BUILD_NUMBER}.tar.gz bundle-release/vic_`git describe --tags $(git rev-list --tags --max-count=1)`.tar.gz
- make sincemark
when:
repo: vmware/vic
event: [ push, tag ]
branch: [ master, releases/*, refs/tags/* ]
notify-slack-on-fail:
image: plugins/slack
webhook: ${SLACK_URL}
username: drone
template: >
build https://ci.vcna.io/vmware/vic/{{ build.number }} finished with a {{ build.status }} status, find the logs here: https://console.cloud.google.com/m/cloudstorage/b/vic-ci-logs/o/integration_logs_{{ build.number }}_{{ build.commit }}.zip?authuser=1
when:
repo: vmware/vic
branch: [ master, releases/*, refs/tags/* ]
status: failure
notify-slack-on-pass:
image: plugins/slack
webhook: ${SLACK_URL}
username: drone
template: >
build https://ci.vcna.io/vmware/vic/{{ build.number }} finished with a {{ build.status }} status, find the build here: https://storage.googleapis.com/vic-engine-builds/vic_{{ build.number }}.tar.gz
when:
repo: vmware/vic
branch: [ master, releases/* ]
status: success
notify-slack-on-successful-tag:
image: plugins/slack
webhook: ${SLACK_URL}
username: drone
template: >
The latest version of VIC engine has been released, find the build here: https://console.cloud.google.com/storage/browser/vic-engine-releases
when:
repo: vmware/vic
branch: [ refs/tags/* ]
status: success
publish-gcs-builds-on-pass:
image: maplain/drone-gcs:latest
pull: true
source: bundle
target: vic-engine-builds
acl:
- allUsers:READER
cache_control: public,max-age=3600
when:
repo: vmware/vic
event: [ push ]
branch: [ master, releases/* ]
status: success
publish-gcs-builds-on-fail:
image: maplain/drone-gcs:latest
pull: true
source: bundle
target: vic-engine-failed-builds
acl:
- allUsers:READER
cache_control: public,max-age=3600
when:
repo: vmware/vic
event: [ push ]
branch: [ master, releases/* ]
status: failure
publish-gcs-releases:
image: maplain/drone-gcs:latest
pull: true
source: bundle-release
target: vic-engine-releases
acl:
- allUsers:READER
cache_control: public,max-age=3600
when:
repo: vmware/vic
event: [ push, tag ]
branch: [ refs/tags/* ]
status: success
trigger-downstream:
image: plugins/downstream
server: https://ci.vcna.io
token: ${DRONE_TOKEN}
fork: true
repositories:
- vmware/vic-product
when:
repo: vmware/vic
event: [ push, tag ]
branch: [ master, releases/*, refs/tags/* ]
status: success
report-coverage:
image: plugins/coverage
server: https://coverage.vmware.run
pattern: .cover/cover.out
when:
branch: [ master, releases/*, refs/tags/* ]
repo: vmware/vic
status: success