@@ -64,42 +64,6 @@ functions:
64
64
env :
65
65
<< : *go_options
66
66
command : make package
67
- " set up remote credentials " :
68
- command : shell.exec
69
- params :
70
- silent : true
71
- script : |
72
- set -o errexit
73
- # Since the macros 'private_key_remote' and 'private_key_file' are not always defined
74
- # we default to /dev/null to avoid syntax errors of an empty expansion.
75
- if [ ! -z "${private_key_remote}" ] && [ ! -z "${private_key_file}" ] ; then
76
- mkdir -p ~/.ssh
77
- echo -n "${private_key_remote}" > ${private_key_file|/dev/null}
78
- chmod 0600 ${private_key_file|/dev/null}
79
- fi
80
- # Ensure a clean aws configuration state
81
- rm -rf ~/.aws
82
- mkdir -p ~/.aws
83
- # If ${aws_profile_remote} is not specified then the config & credentials are
84
- # stored in the 'default' profile.
85
- aws_profile="${aws_profile_remote|default}"
86
- # The profile in the config file is specified as [profile <profile>], except
87
- # for [default], see http://boto3.readthedocs.io/en/latest/guide/configuration.html
88
- if [ $aws_profile = "default" ] ; then
89
- aws_profile_config="[default]"
90
- else
91
- aws_profile_config="[profile $aws_profile]"
92
- fi
93
- cat <<EOF >> ~/.aws/config
94
- $aws_profile_config
95
- region = us-east-1
96
- EOF
97
- # The profile in the credentials file is specified as [<profile>].
98
- cat <<EOF >> ~/.aws/credentials
99
- [$aws_profile]
100
- aws_access_key_id = ${aws_key_remote}
101
- aws_secret_access_key = ${aws_secret_remote}
102
- EOF
103
67
" set up notary client credentials " :
104
68
- command : shell.exec
105
69
params :
@@ -109,21 +73,21 @@ functions:
109
73
set -o errexit
110
74
111
75
cat <<EOF > notary_env.sh
76
+ export NOTARY_KEY_NAME='server-4.4'
112
77
export NOTARY_TOKEN=${signing_auth_token_44}
113
78
export BARQUE_USERNAME=${barque_user}
114
79
export BARQUE_PASSWORD=${barque_password}
115
80
EOF
116
81
117
- if [[ ! -f signing_auth_token_44 ]]; then
118
- echo "${signing_auth_token_44}" > signing_auth_token
119
- fi
82
+ echo "${signing_auth_token_44}" > ./signing_auth_token
120
83
" push " :
121
84
- command : shell.exec
122
85
params :
123
86
working_dir : mongocli
124
87
script : |
125
88
. ./notary_env.sh
126
89
90
+ set -o xtrace
127
91
set -o errexit
128
92
set -o verbose
129
93
@@ -134,14 +98,17 @@ functions:
134
98
# We get the raw version string (v1.2.3-45-gabcdef) from git
135
99
VERSION=$(git describe --abbrev=7 | cut -d "v" -f 2)
136
100
137
- ./curator repo submit \
101
+ ./curator \
102
+ --level debug \
103
+ repo submit \
138
104
--service ${barque_url} \
139
- --config . repo_config.yml \
105
+ --config etc/ repo_config.yml \
140
106
--distro ${distro} \
141
107
--edition ${edition} \
142
108
--version $VERSION \
143
109
--arch x86_64 \
144
- --packages https://s3.amazonaws.com/mongodb-mongocli-build/${project}/${revision}/dist/mongocli_next_${revision}_${version_id}_${created_at}_linux_x86_64.${ext}
110
+ --packages https://s3.amazonaws.com/mongodb-mongocli-build/${project}/dist/${build_id}/${ext}.tgz
111
+
145
112
tasks :
146
113
- name : compile
147
114
commands :
@@ -155,23 +122,18 @@ tasks:
155
122
- func : " gen-notices"
156
123
- func : " fetch goreleaser"
157
124
- func : " package"
158
- - command : shell.exec
125
+ - command : archive.targz_pack
159
126
params :
160
- working_dir : mongocli/dist
161
- script : |
162
- set -o errexit
163
- set -o verbose
164
-
165
- # we could generate a similar name with goreleaser but we want to keep the vars evg compatibale to use later
166
- mv mongocli_next_linux_i386.deb mongocli_next_${revision}_${version_id}_${created_at}_linux_i386.deb
167
- mv mongocli_next_linux_i386.rpm mongocli_next_${revision}_${version_id}_${created_at}_linux_i386.rpm
168
- mv mongocli_next_linux_i386.tar.gz mongocli_next_${revision}_${version_id}_${created_at}_linux_i386.tar.gz
169
- mv mongocli_next_linux_x86_64.deb mongocli_next_${revision}_${version_id}_${created_at}_linux_x86_64.deb
170
- mv mongocli_next_linux_x86_64.rpm mongocli_next_${revision}_${version_id}_${created_at}_linux_x86_64.rpm
171
- mv mongocli_next_linux_x86_64.tar.gz mongocli_next_${revision}_${version_id}_${created_at}_linux_x86_64.tar.gz
172
- mv mongocli_next_macos_x86_64.tar.gz mongocli_next_${revision}_${version_id}_${created_at}_macOS_x86_64.tar.gz
173
- mv mongocli_next_windows_i386.zip mongocli_next_${revision}_${version_id}_${created_at}_windows_i386.zip
174
- mv mongocli_next_windows_x86_64.zip mongocli_next_${revision}_${version_id}_${created_at}_windows_x86_64.zip
127
+ target : mongocli/dist/deb.tgz
128
+ source_dir : mongocli/dist
129
+ include :
130
+ - " mongocli_next_linux_x86_64.deb"
131
+ - command : archive.targz_pack
132
+ params :
133
+ target : mongocli/dist/rpm.tgz
134
+ source_dir : mongocli/dist
135
+ include :
136
+ - " mongocli_next_linux_x86_64.rpm"
175
137
- command : s3.put
176
138
params :
177
139
aws_key : ${aws_key}
@@ -181,7 +143,7 @@ tasks:
181
143
- mongocli/dist/*.zip
182
144
- mongocli/dist/*.deb
183
145
- mongocli/dist/*.rpm
184
- remote_file : ${project}/${revision}/dist /
146
+ remote_file : ${project}/dist/${build_id} /
185
147
bucket : mongodb-mongocli-build
186
148
permissions : public-read
187
149
content_type : ${content_type|application/x-gzip}
@@ -197,10 +159,6 @@ tasks:
197
159
- name : package
198
160
commands :
199
161
- func : " clone"
200
- - func : " set up remote credentials"
201
- vars :
202
- aws_key_remote : ${repo_aws_key}
203
- aws_secret_remote : ${repo_aws_secret}
204
162
- func : " set up notary client credentials"
205
163
- func : " push"
206
164
vars :
@@ -217,10 +175,6 @@ tasks:
217
175
- name : package
218
176
commands :
219
177
- func : " clone"
220
- - func : " set up remote credentials"
221
- vars :
222
- aws_key_remote : ${repo_aws_key}
223
- aws_secret_remote : ${repo_aws_secret}
224
178
- func : " set up notary client credentials"
225
179
- func : " push"
226
180
vars :
@@ -238,10 +192,6 @@ tasks:
238
192
- name : package
239
193
commands :
240
194
- func : " clone"
241
- - func : " set up remote credentials"
242
- vars :
243
- aws_key_remote : ${repo_aws_key}
244
- aws_secret_remote : ${repo_aws_secret}
245
195
- func : " set up notary client credentials"
246
196
- func : " push"
247
197
vars :
@@ -259,10 +209,6 @@ tasks:
259
209
- name : package
260
210
commands :
261
211
- func : " clone"
262
- - func : " set up remote credentials"
263
- vars :
264
- aws_key_remote : ${repo_aws_key}
265
- aws_secret_remote : ${repo_aws_secret}
266
212
- func : " set up notary client credentials"
267
213
- func : " push"
268
214
vars :
@@ -296,10 +242,6 @@ tasks:
296
242
- name : package
297
243
commands :
298
244
- func : " clone"
299
- - func : " set up remote credentials"
300
- vars :
301
- aws_key_remote : ${repo_aws_key}
302
- aws_secret_remote : ${repo_aws_secret}
303
245
- func : " set up notary client credentials"
304
246
- func : " push"
305
247
vars :
@@ -318,10 +260,6 @@ tasks:
318
260
- name : package
319
261
commands :
320
262
- func : " clone"
321
- - func : " set up remote credentials"
322
- vars :
323
- aws_key_remote : ${repo_aws_key}
324
- aws_secret_remote : ${repo_aws_secret}
325
263
- func : " set up notary client credentials"
326
264
- func : " push"
327
265
vars :
@@ -338,10 +276,6 @@ tasks:
338
276
- name : package
339
277
commands :
340
278
- func : " clone"
341
- - func : " set up remote credentials"
342
- vars :
343
- aws_key_remote : ${repo_aws_key}
344
- aws_secret_remote : ${repo_aws_secret}
345
279
- func : " set up notary client credentials"
346
280
- func : " push"
347
281
vars :
@@ -359,11 +293,6 @@ tasks:
359
293
- name : package
360
294
commands :
361
295
- func : " clone"
362
- - func : " set up remote credentials"
363
- vars :
364
- aws_key_remote : ${repo_aws_key}
365
- aws_secret_remote : ${repo_aws_secret}
366
- - func : " set up notary client credentials"
367
296
- func : " push"
368
297
vars :
369
298
edition : enterprise
@@ -379,10 +308,6 @@ tasks:
379
308
- name : package
380
309
commands :
381
310
- func : " clone"
382
- - func : " set up remote credentials"
383
- vars :
384
- aws_key_remote : ${repo_aws_key}
385
- aws_secret_remote : ${repo_aws_secret}
386
311
- func : " set up notary client credentials"
387
312
- func : " push"
388
313
vars :
@@ -400,10 +325,6 @@ tasks:
400
325
- name : package
401
326
commands :
402
327
- func : " clone"
403
- - func : " set up remote credentials"
404
- vars :
405
- aws_key_remote : ${repo_aws_key}
406
- aws_secret_remote : ${repo_aws_secret}
407
328
- func : " set up notary client credentials"
408
329
- func : " push"
409
330
vars :
@@ -420,10 +341,6 @@ tasks:
420
341
- name : package
421
342
commands :
422
343
- func : " clone"
423
- - func : " set up remote credentials"
424
- vars :
425
- aws_key_remote : ${repo_aws_key}
426
- aws_secret_remote : ${repo_aws_secret}
427
344
- func : " set up notary client credentials"
428
345
- func : " push"
429
346
vars :
@@ -441,10 +358,6 @@ tasks:
441
358
- name : package
442
359
commands :
443
360
- func : " clone"
444
- - func : " set up remote credentials"
445
- vars :
446
- aws_key_remote : ${repo_aws_key}
447
- aws_secret_remote : ${repo_aws_secret}
448
361
- func : " set up notary client credentials"
449
362
- func : " push"
450
363
vars :
@@ -461,11 +374,6 @@ tasks:
461
374
- name : package
462
375
commands :
463
376
- func : " clone"
464
- - func : " set up remote credentials"
465
- vars :
466
- aws_key_remote : ${repo_aws_key}
467
- aws_secret_remote : ${repo_aws_secret}
468
- - func : " set up notary client credentials"
469
377
- func : " push"
470
378
vars :
471
379
edition : org
@@ -482,10 +390,6 @@ tasks:
482
390
- name : package
483
391
commands :
484
392
- func : " clone"
485
- - func : " set up remote credentials"
486
- vars :
487
- aws_key_remote : ${repo_aws_key}
488
- aws_secret_remote : ${repo_aws_secret}
489
393
- func : " set up notary client credentials"
490
394
- func : " push"
491
395
vars :
@@ -502,10 +406,6 @@ tasks:
502
406
- name : package
503
407
commands :
504
408
- func : " clone"
505
- - func : " set up remote credentials"
506
- vars :
507
- aws_key_remote : ${repo_aws_key}
508
- aws_secret_remote : ${repo_aws_secret}
509
409
- func : " set up notary client credentials"
510
410
- func : " push"
511
411
vars :
@@ -523,10 +423,6 @@ tasks:
523
423
- name : package
524
424
commands :
525
425
- func : " clone"
526
- - func : " set up remote credentials"
527
- vars :
528
- aws_key_remote : ${repo_aws_key}
529
- aws_secret_remote : ${repo_aws_secret}
530
426
- func : " set up notary client credentials"
531
427
- func : " push"
532
428
vars :
@@ -543,10 +439,6 @@ tasks:
543
439
- name : package
544
440
commands :
545
441
- func : " clone"
546
- - func : " set up remote credentials"
547
- vars :
548
- aws_key_remote : ${repo_aws_key}
549
- aws_secret_remote : ${repo_aws_secret}
550
442
- func : " set up notary client credentials"
551
443
- func : " push"
552
444
vars :
0 commit comments