forked from vmware/vic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
142 lines (135 loc) · 3.7 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
# After any change to this file you MUST regenerate and checkin
# a .drone.sec even if no secrets were changed. The secrets file is tied
# to a specific .drone.yml so artifacts will not be uploaded to Bintray
# in following builds without an updated .drone.sec
---
clone:
path: github.com/vmware/vic
tags: true
build:
vic:
image: golang:1.6.2
pull: true
environment:
BIN: bin
GOPATH: /drone
SHELL: /bin/bash
DOCKER_API_VERSION: "1.21"
VIC_ESX_TEST_URL: $$VIC_ESX_TEST_URL
commands:
- apt-get update
- apt-get install -yq time
- make all
- make test
integration-test-on-pr:
image: $${TEST_BUILD_IMAGE=vmware-docker-ci-repo.bintray.io/integration/vic-test:1.0}
pull: true
environment:
BIN: bin
GOPATH: /drone
SHELL: /bin/bash
DOCKER_API_VERSION: "1.21"
VIC_ESX_TEST_URL: $$VIC_ESX_TEST_URL
LOG_TEMP_DIR: install-logs
TEST_URL: $$TEST_URL
TEST_USERNAME: $$TEST_USERNAME
TEST_PASSWORD: $$TEST_PASSWORD
TEST_RESOURCE: $$TEST_RESOURCE
GOVC_URL: $$TEST_USERNAME:$$TEST_PASSWORD@$$TEST_URL
GOVC_INSECURE: true
GOVC_USERNAME: $$TEST_USERNAME
GOVC_PASSWORD: $$TEST_PASSWORD
GOVC_RESOURCE_POOL: $$TEST_RESOURCE
GS_PROJECT_ID: $$GS_PROJECT_ID
GS_CLIENT_EMAIL: $$GS_CLIENT_EMAIL
GS_PRIVATE_KEY: $$GS_PRIVATE_KEY
commands:
- tests/integration-test.sh
when:
event: "pull_request"
success: true
integration-test-on-merge:
image: $${TEST_BUILD_IMAGE=vmware-docker-ci-repo.bintray.io/integration/vic-test:1.0}
pull: true
environment:
BIN: bin
GOPATH: /drone
SHELL: /bin/bash
DOCKER_API_VERSION: "1.21"
VIC_ESX_TEST_URL: $$VIC_ESX_TEST_URL
LOG_TEMP_DIR: install-logs
TEST_URL: $$TEST_URL
TEST_USERNAME: $$TEST_USERNAME
TEST_PASSWORD: $$TEST_PASSWORD
TEST_RESOURCE: $$TEST_RESOURCE
GOVC_URL: $$TEST_USERNAME:$$TEST_PASSWORD@$$TEST_URL
GOVC_INSECURE: true
GOVC_USERNAME: $$TEST_USERNAME
GOVC_PASSWORD: $$TEST_PASSWORD
GOVC_RESOURCE_POOL: $$TEST_RESOURCE
GS_PROJECT_ID: $$GS_PROJECT_ID
GS_CLIENT_EMAIL: $$GS_CLIENT_EMAIL
GS_PRIVATE_KEY: $$GS_PRIVATE_KEY
commands:
- tests/integration-test.sh
when:
repo: vmware/vic
branch: master
success: true
bundle:
image: golang:1.6.2
pull: true
environment:
BIN: bin
BIN_TEMP_DIR: bin/vic
GOPATH: /drone
SHELL: /bin/bash
commands:
- rm -rf $BIN_TEMP_DIR
- mkdir $BIN_TEMP_DIR
- cp LICENSE $BIN_TEMP_DIR
- cp doc/bundle/README $BIN_TEMP_DIR
- cp $BIN/vic-machine* $BIN_TEMP_DIR
- cp $BIN/appliance.iso $BIN_TEMP_DIR
- cp $BIN/bootstrap.iso $BIN_TEMP_DIR
- tar czvf $BIN/vic_$$BUILD_NUMBER.tar.gz -C $BIN vic
- shasum -a 256 $BIN/vic_$$BUILD_NUMBER.tar.gz
when:
success: true
notify:
slack:
channel: vic-dev
webhook_url: $$SLACK_URL
username: drone
when:
repo: vmware/vic
branch: master
success: false
publish:
coverage:
server: https://coverage.vmware.run
token: $$GITHUB_AUTOMATION_API_KEY
when:
repo: vmware/vic
branch: master
success: true
bintray:
username: $$BINTRAY_USERNAME
api_key: $$BINTRAY_API_KEY
artifacts:
- file: bin/vic_$$BUILD_NUMBER.tar.gz
owner: vmware
type: executable
repository: vic-repo
package: build
version: $$BUILD_NUMBER
target: vic_$$BUILD_NUMBER.tar.gz
publish: true
when:
repo: vmware/vic
branch: master
success: true
cache:
mount:
- /drone/bin
- bin