ci: publish Docker images for bifrost-* branches
(cherry picked from commit 3e49bb16b43e07cfce9805ceafaddbb9d3261010)
guseggert committed
Aug 26, 2021 at 14:03 UTC
630e5e578eefbe31a890d19be564c877ada0541d
2 files changed
+8
-1
.circleci/config.yml
+3
-1
@@ -428,7 +428,9 @@ workflows:
428
branches:
429
only:
430
- master
431
- - feat/stabilize-dht
431
+ # the bifrst-* branches are used for deploying code that hasn't hit master yet (e.g. for testing)
432
+ - /^bifrost-.*/
433
+
434
435
# NOTE: CircleCI only builds tags if you explicitly filter for them. That
436
# also means tag-based jobs can only depend on other tag-based jobs, so we
bin/push-docker-tags.sh
+5
@@ -67,6 +67,11 @@ elif [[ $GIT_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
67
pushTag "latest"
68
pushTag "release" # see: https://github.com/ipfs/go-ipfs/issues/3999#issuecomment-742228981
69
70
+elif [[ $GIT_BRANCH =~ ^bifrost-.* ]]; then
71
+ # sanitize the branch name since docker tags have stricter char limits than git branch names
72
+ branch=$(echo "$GIT_BRANCH" | tr '/' '-' | tr --delete --complement '[:alnum:]-')
73
+ pushTag "${branch}-${BUILD_NUM}-${GIT_SHA1_SHORT}"
74
+
75
elif [ "$GIT_BRANCH" = "master" ]; then
76
pushTag "master-${BUILD_NUM}-${GIT_SHA1_SHORT}"
77
pushTag "master-latest"