@@ -35,40 +35,6 @@ commands:
35
35
- run : git submodule sync
36
36
- run : sudo apt-get install gcc libc-dev
37
37
- run : git submodule update --init
38
- trigger-deployment :
39
- steps :
40
- - checkout
41
- - run :
42
- name : Trigger deployment for filecoin-project/lily
43
- command : |
44
- # derive docker image deploy-tag according to the publish-* steps in this config
45
- branch_tag_suffix=`echo "$CIRCLE_SHA1" | cut -c 1-8`
46
- sanitized_branch=`echo $CIRCLE_BRANCH | sed 's:/:-:g'`
47
- deploy_branch=${sanitized_branch}-${branch_tag_suffix}
48
- sanitized_tag=`echo $CIRCLE_TAG | sed 's:/:-:g'`
49
-
50
- # if $sanitized_tag is empty, default to $sanitized_branch
51
- deploy_target=${sanitized_tag:-$deploy_branch}
52
-
53
- # curlf fails with a non-zero exit code when the status code is not 2XX
54
- curlf() {
55
- OUTPUT_FILE=$(mktemp)
56
- HTTP_CODE=$(curl --silent --output $OUTPUT_FILE --write-out "%{http_code}" "$@")
57
- if [[ ${HTTP_CODE} -lt 200 || ${HTTP_CODE} -gt 299 ]] ; then
58
- >&2 cat $OUTPUT_FILE
59
- return 22
60
- fi
61
- cat $OUTPUT_FILE
62
- rm $OUTPUT_FILE
63
- }
64
-
65
- # trigger deployment in sentinel-infra repo
66
- curlf --request POST \
67
- --url https://circleci.com/api/v2/project/gh/filecoin-project/sentinel-infra/pipeline \
68
- --header "Circle-Token: $SENTINEL_INFRA_CIRCLECI_API_TOKEN" \
69
- --header "content-type: application/json" \
70
- --data "{\"branch\":\"master\",\"parameters\":{\"trigger-deploy\": true, \"deploy-tag\":\"$deploy_target\"}}"
71
- echo ""
72
38
validate-docker-executeable :
73
39
steps :
74
40
- run :
89
55
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
90
56
sanitized_branch=`echo $CIRCLE_BRANCH | sed 's:/:-:g'`
91
57
tag_suffix=$(echo "$CIRCLE_SHA1" | cut -c 1-8)
92
- make docker-mainnet-push LILY_IMAGE_TAG=${sanitized_branch}-${tag_suffix}
58
+ tag_date=$(date +%Y%m%d%H%M)
59
+ make docker-mainnet-push LILY_IMAGE_TAG=${sanitized_branch}-${tag_date}-${tag_suffix}
93
60
publish-production-image-from-branch-for-calibnet :
94
61
executor : dockerizer
95
62
steps :
@@ -170,16 +137,6 @@ jobs:
170
137
if [[ "$CIRCLE_TAG" =~ ^(v[0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
171
138
LILY_IMAGE_TAG=butterflynet-latest make docker-butterflynet-push
172
139
fi
173
- # duplicated jobs are for making these jobs' descriptions
174
- # in the pipelines within the CircleCI less confusing
175
- trigger-branch-deployment-for-all-networks :
176
- executor : dockerizer
177
- steps :
178
- - trigger-deployment
179
- trigger-semver-tag-deployment-for-all-networks :
180
- executor : dockerizer
181
- steps :
182
- - trigger-deployment
183
140
mod-tidy-check :
184
141
executor : golang
185
142
steps :
@@ -346,7 +303,7 @@ jobs:
346
303
# used in `build-docker-images` workflow below
347
304
branch_filters : &branch_filters
348
305
branches :
349
- only : /.*deploy.* /
306
+ only : /^cd\/staging$ /
350
307
tags :
351
308
ignore : /.*/
352
309
@@ -377,19 +334,13 @@ workflows:
377
334
- publish-production-image-from-branch-for-mainnet :
378
335
filters :
379
336
<< : *branch_filters
380
- - publish-production-image-from-branch-for-calibnet :
381
- filters :
382
- << : *branch_filters
383
- - publish-production-image-from-branch-for-butterflynet :
384
- filters :
385
- << : *branch_filters
386
- - trigger-branch-deployment-for-all-networks :
387
- requires :
388
- - publish-production-image-from-branch-for-mainnet
389
- - publish-production-image-from-branch-for-calibnet
390
- - publish-production-image-from-branch-for-butterflynet
391
- filters :
392
- << : *branch_filters
337
+ # only publish staging images for mainnet
338
+ # - publish-production-image-from-branch-for-calibnet:
339
+ # filters:
340
+ # <<: *branch_filters
341
+ # - publish-production-image-from-branch-for-butterflynet:
342
+ # filters:
343
+ # <<: *branch_filters
393
344
- publish-production-image-from-semver-tag-for-mainnet :
394
345
filters :
395
346
<< : *tag_filters
@@ -399,11 +350,4 @@ workflows:
399
350
- publish-production-image-from-semver-tag-for-butterflynet :
400
351
filters :
401
352
<< : *tag_filters
402
- - trigger-semver-tag-deployment-for-all-networks :
403
- requires :
404
- - publish-production-image-from-semver-tag-for-mainnet
405
- - publish-production-image-from-semver-tag-for-calibnet
406
- - publish-production-image-from-semver-tag-for-butterflynet
407
- filters :
408
- << : *tag_filters
409
353
0 commit comments