Skip to content

Commit

Permalink
ci: publish Docker images for bifrost-* branches
Browse files Browse the repository at this point in the history
  • Loading branch information
guseggert committed Aug 26, 2021
1 parent ae09459 commit 3e49bb1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,9 @@ workflows:
branches:
only:
- master
- feat/stabilize-dht
# the bifrst-* branches are used for deploying code that hasn't hit master yet (e.g. for testing)
- /^bifrost-.*/


# NOTE: CircleCI only builds tags if you explicitly filter for them. That
# also means tag-based jobs can only depend on other tag-based jobs, so we
Expand Down
5 changes: 5 additions & 0 deletions bin/push-docker-tags.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ elif [[ $GIT_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
pushTag "latest"
pushTag "release" # see: https://github.com/ipfs/go-ipfs/issues/3999#issuecomment-742228981

elif [[ $GIT_BRANCH =~ ^bifrost-.* ]]; then
# sanitize the branch name since docker tags have stricter char limits than git branch names
branch=$(echo "$GIT_BRANCH" | tr '/' '-' | tr --delete --complement '[:alnum:]-')
pushTag "${branch}-${BUILD_NUM}-${GIT_SHA1_SHORT}"

elif [ "$GIT_BRANCH" = "master" ]; then
pushTag "master-${BUILD_NUM}-${GIT_SHA1_SHORT}"
pushTag "master-latest"
Expand Down

0 comments on commit 3e49bb1

Please sign in to comment.