forked from vmware-archive/vsphere-storage-for-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
135 lines (125 loc) · 3.95 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
clone:
path: github.com/vmware/docker-volume-vsphere
tags: true
build:
build_dev:
image: cnastorage/vibauthor-and-go:0.8
environment:
- KEY=$$KEY
commands:
- pwd
- go get github.com/golang/lint/golint
- 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:
event: [push, pull_request]
build_tag:
image: cnastorage/vibauthor-and-go:0.8
environment:
- KEY=$$KEY
commands:
- export PKG_VERSION=$$TAG
- echo $PKG_VERSION
- go get github.com/golang/lint/golint
- 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:
event: tag
package:
image: cnastorage/fpm
commands:
- make -s deb rpm
when:
event: [push, pull_request]
package_tag:
image: cnastorage/fpm
commands:
- export PKG_VERSION=$$TAG
- echo $PKG_VERSION
- make -s deb rpm
when:
event: tag
test_dev_branch: # Identical to test except for when it occurs
image: cnastorage/vibauthor-and-go:0.8
privileged: true
environment:
- GOVC_USERNAME=$$CI_VMWARE_ESX_USER
- GOVC_PASSWORD=$$CI_VMWARE_ESX_PASS
- GOVC_INSECURE=1
- GOVC_URL=$$CI_ESX_IP
- SSH_KEY_OPT=-i /drone/src/github.com/vmware/docker-volume-vsphere/key
commands:
- pwd
- export VM1=`govc vm.ip photon.ga.vmfs`
- export VM2=`govc vm.ip Ubuntu.1404.vmfs`
- ./misc/drone-scripts/deploy-and-test-wrapper.sh $GOVC_URL $VM1 $VM2 $$BUILD_NUMBER < /dev/null
- echo
- echo "=> Running tests on VSAN"
- echo "=>" `date`
- echo
- export VM1=`govc vm.ip photon.ga.vsan`
- export VM2=`govc vm.ip Ubuntu.1404.vsan`
- ./misc/drone-scripts/deploy-and-test-wrapper.sh $GOVC_URL $VM1 $VM2 $$BUILD_NUMBER < /dev/null
when:
event: [push]
branch: [master, runci/*]
test:
image: cnastorage/vibauthor-and-go:0.8
privileged: true
environment:
- GOVC_USERNAME=$$CI_VMWARE_ESX_USER
- GOVC_PASSWORD=$$CI_VMWARE_ESX_PASS
- GOVC_INSECURE=1
- GOVC_URL=$$CI_ESX_IP
- SSH_KEY_OPT=-i /drone/src/github.com/vmware/docker-volume-vsphere/key
commands:
- export VM1=`govc vm.ip photon.ga.vmfs`
- export VM2=`govc vm.ip Ubuntu.1404.vmfs`
- ./misc/drone-scripts/deploy-and-test-wrapper.sh $GOVC_URL $VM1 $VM2 $$BUILD_NUMBER < /dev/null
- echo
- echo "=> Running tests on VSAN"
- echo "=>" `date`
- echo
- export VM1=`govc vm.ip photon.ga.vsan`
- export VM2=`govc vm.ip Ubuntu.1404.vsan`
- ./misc/drone-scripts/deploy-and-test-wrapper.sh $GOVC_URL $VM1 $VM2 $$BUILD_NUMBER < /dev/null
when:
event: [pull_request]
test_tag:
image: cnastorage/vibauthor-and-go:0.8
privileged: true
environment:
- GOVC_USERNAME=$$CI_VMWARE_ESX_USER
- GOVC_PASSWORD=$$CI_VMWARE_ESX_PASS
- GOVC_INSECURE=1
- GOVC_URL=$$CI_ESX_IP
- SSH_KEY_OPT=-i /drone/src/github.com/vmware/docker-volume-vsphere/key
commands:
- export PKG_VERSION=$$TAG
- export VM1=`govc vm.ip photon.ga.vmfs`
- export VM2=`govc vm.ip Ubuntu.1404.vmfs`
- ./misc/drone-scripts/deploy-and-test-wrapper.sh $GOVC_URL $VM1 $VM2 $$BUILD_NUMBER < /dev/null
- echo
- echo "=> Running tests on VSAN"
- echo "=>" `date`
- echo
- export VM1=`govc vm.ip photon.ga.vsan`
- export VM2=`govc vm.ip Ubuntu.1404.vsan`
- ./misc/drone-scripts/deploy-and-test-wrapper.sh $GOVC_URL $VM1 $VM2 $$BUILD_NUMBER < /dev/null
when:
event: tag
matrix:
GO_VERSION:
- 1.6
publish:
github_release:
api_key: $$GITHUB_TOKEN
files:
- build/*.deb
- build/*.rpm
- build/*.vib
- build/*.zip
when:
event: tag