forked from rexray/rexray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
207 lines (193 loc) · 6.71 KB
/
.travis.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
os: linux
dist: trusty
env:
global:
- PROG=rexray
jobs:
include:
# the first stage builds all of the binaries possible, searching
# for any build errors that could possibly occur. this prevents
# the subsequent stages from wasting time enqueued for available vms
- &build-stage
stage: build
language: go
go: 1.9.1
go_import_path: github.com/thecodeteam/rexray
env: PROG=rexray
before_script:
- git fetch --unshallow --tags
script:
- export GOARCH=${XGOARCH:-amd64}
- make
- md5sum $PROG
- ls -al $PROG
- if [ "$GOARCH" = "amd64" ]; then ./$PROG version; else file $PROG; fi
- <<: *build-stage
env: PROG=rexray XGOARCH=arm
- <<: *build-stage
env: PROG=rexray XGOARCH=arm64
- <<: *build-stage
env: PROG=rexray-agent TYPE=agent
- <<: *build-stage
env: PROG=rexray-controller TYPE=controller
- <<: *build-stage
env: DRIVER=azureud
- <<: *build-stage
env: DRIVER=cinder
- <<: *build-stage
env: DRIVER=csi-nfs
- <<: *build-stage
env: DRIVER=dobs
- <<: *build-stage
env: DRIVER=ebs
- <<: *build-stage
env: DRIVER=efs
- <<: *build-stage
env: DRIVER=gcepd
- <<: *build-stage
env: DRIVER=isilon
- <<: *build-stage
env: DRIVER=rbd
- <<: *build-stage
env: DRIVER=s3fs
- <<: *build-stage
env: DRIVER=scaleio
# the second stage builds all of the tests, executes the framework
# tests using the vfs driver, and uploads the resulting coverage
# results to codecov.io
- stage: test
language: go
go: 1.9.1
go_import_path: github.com/thecodeteam/rexray
before_script:
- git fetch --unshallow --tags
- go run core/semver/semver.go -f json
script:
- make test
- make cover
# the third stage is responsible for producing the rexray stand-alone,
# agent, client, and controller binaries as well as packaging the
# binaries and uploading them to bintray
- &deploy-stage
stage: deploy
language: c
env: PROG=rexray
services: docker
sudo: required
before_install:
- gem install gist
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- docker --version
install:
- sudo apt-get -y install rpm debhelper dpkg dpkg-dev fakeroot alien
before_script:
- git fetch --unshallow --tags
script:
- export GOARCH=${XGOARCH:-amd64}
- make
- md5sum $PROG
- ls -al $PROG
- if [ "$GOARCH" = "amd64" ]; then ./$PROG version; else file $PROG; fi
- make tgz
- if [ "$GOARCH" = "amd64" ]; then make rpm; fi
- if [ "$GOARCH" = "amd64" ]; then make deb; fi
- make bintray
after_success:
- make create-gist
after_failure:
- make create-gist
deploy:
- &deploy-to-bintray
provider: bintray
file: bintray-unstable.json
user: $BINTRAY_USER
key: $BINTRAY_KEY
skip_cleanup: true
on:
all_branches: true
condition: $DEPLOY_BINTRAY != 0 && $TRAVIS_TAG =~ ^$ && ($TRAVIS_REPO_SLUG = 'thecodeteam/rexray' || $IGNORE_REPO_SLUG_CONDITION = true) && ($TRAVIS_BRANCH = master || $IGNORE_BRANCH_CONDITION = true)
- <<: *deploy-to-bintray
file: bintray-staged.json
on:
all_branches: true
condition: $DEPLOY_BINTRAY != 0 && $TRAVIS_TAG =~ -rc[[:digit:]]+$ && ($TRAVIS_REPO_SLUG = 'thecodeteam/rexray' || $IGNORE_REPO_SLUG_CONDITION = true)
- <<: *deploy-to-bintray
file: bintray-stable.json
on:
all_branches: true
condition: $DEPLOY_BINTRAY != 0 && $TRAVIS_TAG =~ ^v?[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]$ && ($TRAVIS_REPO_SLUG = 'thecodeteam/rexray' || $IGNORE_REPO_SLUG_CONDITION = true)
- <<: *deploy-stage
env: PROG=rexray XGOARCH=arm
- <<: *deploy-stage
env: PROG=rexray XGOARCH=arm64
- <<: *deploy-stage
env: PROG=rexray-agent TYPE=agent
- <<: *deploy-stage
env: PROG=rexray-client TYPE=client
- <<: *deploy-stage
env: PROG=rexray-controller TYPE=controller
# the final stage is responsible for building the docker managed
# storage plug-ins using driver-specific versions of the stand-alone
# rex-ray binaries
- &docker-stage
stage: docker
language: c
env: DRIVER=azureud
services: docker
sudo: required
before_install:
- gem install gist
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- docker --version
before_script:
- git fetch --unshallow --tags
script:
- make
- md5sum $PROG
- ls -al $PROG
- ./$PROG version
- make build-docker-plugin
after_success:
- make create-gist
after_failure:
- make create-gist
deploy:
- &deploy-docker
provider: script
script: ./make.sh push-docker-plugin unstable
skip_cleanup: true
on:
all_branches: true
condition: $DEPLOY_DOCKER != 0 && $TRAVIS_TAG =~ ^$ && ($TRAVIS_REPO_SLUG = 'thecodeteam/rexray' || $IGNORE_REPO_SLUG_CONDITION = true) && ($TRAVIS_BRANCH = master || $IGNORE_BRANCH_CONDITION = true)
- <<: *deploy-docker
script: ./make.sh push-docker-plugin staged
on:
all_branches: true
condition: $DEPLOY_DOCKER != 0 && $TRAVIS_TAG =~ -rc[[:digit:]]+$ && ($TRAVIS_REPO_SLUG = 'thecodeteam/rexray' || $IGNORE_REPO_SLUG_CONDITION = true)
- <<: *deploy-docker
script: ./make.sh push-docker-plugin stable
on:
all_branches: true
condition: $DEPLOY_DOCKER != 0 && $TRAVIS_TAG =~ ^v?[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]$ && ($TRAVIS_REPO_SLUG = 'thecodeteam/rexray' || $IGNORE_REPO_SLUG_CONDITION = true)
- <<: *docker-stage
env: DRIVER=cinder
- <<: *docker-stage
env: DRIVER=csi-nfs
- <<: *docker-stage
env: DRIVER=dobs
- <<: *docker-stage
env: DRIVER=ebs
- <<: *docker-stage
env: DRIVER=efs
- <<: *docker-stage
env: DRIVER=gcepd
- <<: *docker-stage
env: DRIVER=isilon
- <<: *docker-stage
env: DRIVER=rbd
- <<: *docker-stage
env: DRIVER=s3fs
- <<: *docker-stage
env: DRIVER=scaleio