This repository was archived by the owner on Jul 12, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwercker.yml
277 lines (237 loc) · 10.6 KB
/
wercker.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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
box: golang
build:
steps:
- setup-go-workspace
# Gets the dependencies
- script:
name: go get
code: |
cd $WERCKER_SOURCE_DIR
go version
wget https://github.com/Masterminds/glide/releases/download/v0.12.2/glide-v0.12.2-linux-amd64.tar.gz
tar xvzf glide-v0.12.2-linux-amd64.tar.gz
export PATH=./linux-amd64:$WERCKER_SOURCE_DIR/bin:$PATH
glide --version
glide install
# Test the project
- script:
name: go test
code: |
LOG_LEVEL=debug go test $(glide novendor) -v -cover -race
after-steps:
- slack-notifier:
url: $SLACK_URL
channel: enaml
username: robo-enaml
notify_on: failed
branch: master
crosscompile:
steps:
- setup-go-workspace
# Gets the dependencies
- script:
name: go get
code: |
cd $WERCKER_SOURCE_DIR
go version
wget https://github.com/Masterminds/glide/releases/download/v0.12.2/glide-v0.12.2-linux-amd64.tar.gz
tar xvzf glide-v0.12.2-linux-amd64.tar.gz
export PATH=./linux-amd64:$WERCKER_SOURCE_DIR/bin:$PATH
glide --version
glide install
- script:
name: set release id variable for version
code: |
go get github.com/xchapter7x/versioning
export WERCKER_GITHUB_CREATE_RELEASE_ID=`versioning bump_patch`
- script:
name: compile built in product plugins
code: |
COMMIT=`git rev-parse HEAD | cut -c1-6`
VERSION=${WERCKER_GITHUB_CREATE_RELEASE_ID}-${COMMIT}
GOOS=darwin go build -o concourse-plugin-osx -ldflags "-s -w -X main.Version=${VERSION}" ./products/concourse/cmd/concourse-plugin/main.go
GOOS=linux go build -o concourse-plugin-linux -ldflags "-s -w -X main.Version=${VERSION}" ./products/concourse/cmd/concourse-plugin/main.go
GOOS=darwin go build -o vault-plugin-osx -ldflags "-s -w -X main.Version=${VERSION}" ./products/vault/cmd/vault/main.go
GOOS=linux go build -o vault-plugin-linux -ldflags "-s -w -X main.Version=${VERSION}" ./products/vault/cmd/vault/main.go
GOOS=darwin go build -o redis-plugin-osx -ldflags "-s -w -X main.Version=${VERSION}" ./products/redis/cmd/redis/main.go
GOOS=linux go build -o redis-plugin-linux -ldflags "-s -w -X main.Version=${VERSION}" ./products/redis/cmd/redis/main.go
GOOS=darwin go build -o cloudfoundry-plugin-osx -ldflags "-s -w -X main.Version=${VERSION}" ./products/cloudfoundry/cmd/cloudfoundry/main.go
GOOS=linux go build -o cloudfoundry-plugin-linux -ldflags "-s -w -X main.Version=${VERSION}" ./products/cloudfoundry/cmd/cloudfoundry/main.go
GOOS=darwin go build -o docker-registry-plugin-osx -ldflags "-s -w -X main.Version=${VERSION}" ./products/dockerregistry/cmd/dockerregistry/main.go
GOOS=linux go build -o docker-registry-plugin-linux -ldflags "-s -w -X main.Version=${VERSION}" ./products/dockerregistry/cmd/dockerregistry/main.go
GOOS=darwin go build -o docker-plugin-osx -ldflags "-s -w -X main.Version=${VERSION}" ./products/docker/cmd/docker/main.go
GOOS=linux go build -o docker-plugin-linux -ldflags "-s -w -X main.Version=${VERSION}" ./products/docker/cmd/docker/main.go
GOOS=darwin go build -o p-mysql-plugin-osx -ldflags "-s -w -X main.Version=${VERSION}" ./products/p-mysql/cmd/p-mysql/main.go
GOOS=linux go build -o p-mysql-plugin-linux -ldflags "-s -w -X main.Version=${VERSION}" ./products/p-mysql/cmd/p-mysql/main.go
GOOS=linux go build -o p-rabbitmq-plugin-linux -ldflags "-s -w -X main.Version=${VERSION}" ./products/p-rabbitmq/cmd/p-rabbitmq/main.go
GOOS=darwin go build -o p-rabbitmq-plugin-osx -ldflags "-s -w -X main.Version=${VERSION}" ./products/p-rabbitmq/cmd/p-rabbitmq/main.go
GOOS=linux go build -o p-spring-cloud-services-plugin-linux -ldflags "-s -w -X main.Version=${VERSION}" ./products/p-scs/cmd/p-scs/main.go
GOOS=darwin go build -o p-spring-cloud-services-plugin-osx -ldflags "-s -w -X main.Version=${VERSION}" ./products/p-scs/cmd/p-scs/main.go
GOOS=linux go build -o sfogliatelle-plugin-linux -ldflags "-s -w -X main.Version=${VERSION}" ./products/sfogliatelle/cmd/sfogliatelle/main.go
GOOS=darwin go build -o sfogliatelle-plugin-osx -ldflags "-s -w -X main.Version=${VERSION}" ./products/sfogliatelle/cmd/sfogliatelle/main.go
GOOS=linux go build -o oss-cf-plugin-linux -ldflags "-s -w -X main.Version=${VERSION}" ./products/oss_cf/cmd/oss_cf/main.go
GOOS=darwin go build -o oss-cf-plugin-osx -ldflags "-s -w -X main.Version=${VERSION}" ./products/oss_cf/cmd/oss_cf/main.go
GOOS=linux go build -o minio-plugin-linux -ldflags "-s -w -X main.Version=${VERSION}" ./products/minio/cmd/minio/main.go
GOOS=darwin go build -o minio-plugin-osx -ldflags "-s -w -X main.Version=${VERSION}" ./products/minio/cmd/minio/main.go
- script:
name: add repo to artifact
code: |
cp -R ./ ${WERCKER_OUTPUT_DIR}
deploy-pre-release:
steps:
- setup-go-workspace
- script:
name: install-packages
code: |
sudo apt-get install -y openssh-client wget
ls -la
pwd
echo ${WERCKER_OUTPUT_DIR}
ls -la ${WERCKER_OUTPUT_DIR}
- wercker/[email protected]:
keyname: PCF_GITHUB_KEY
- wercker/[email protected]:
hostname: github.com
fingerprint: 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
- script:
name: set release id variable for version
code: |
go get github.com/xchapter7x/versioning
export WERCKER_GITHUB_CREATE_RELEASE_ID=`versioning bump_patch`-`git rev-parse HEAD | cut -c1-6`
- github-create-release:
token: $GITHUB_TOKEN
tag: $WERCKER_GITHUB_CREATE_RELEASE_ID
title: omg-product-bundles $WERCKER_GITHUB_CREATE_RELEASE_ID
draft: true
prerelease: ${IS_PRE_RELEASE}
- github-upload-asset:
token: $GITHUB_TOKEN
file: concourse-plugin-linux
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: concourse-plugin-osx
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: vault-plugin-linux
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: vault-plugin-osx
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: redis-plugin-linux
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: redis-plugin-osx
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: cloudfoundry-plugin-linux
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: cloudfoundry-plugin-osx
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: docker-registry-plugin-linux
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: docker-registry-plugin-osx
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: docker-plugin-linux
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: docker-plugin-osx
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: p-mysql-plugin-linux
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: p-mysql-plugin-osx
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: p-rabbitmq-plugin-linux
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: p-rabbitmq-plugin-osx
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: p-spring-cloud-services-plugin-linux
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: p-spring-cloud-services-plugin-osx
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: sfogliatelle-plugin-linux
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: sfogliatelle-plugin-osx
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: oss-cf-plugin-linux
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: oss-cf-plugin-osx
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: minio-plugin-linux
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- github-upload-asset:
token: $GITHUB_TOKEN
file: minio-plugin-osx
release_id: $WERCKER_GITHUB_CREATE_RELEASE_ID
content-type: application/x-gzip
- script:
name: add repo to artifact
code: |
cp -R ./ ${WERCKER_OUTPUT_DIR}
after-steps:
- slack-notifier:
url: $SLACK_URL
channel: enaml
username: robo-enaml
notify_on: failed
branch: master