-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CircleCI pushes releases to dockerhub based on tags and branches #1694
Conversation
009a073
to
5a2b32d
Compare
68d04cb
to
9232b0f
Compare
06bbf3f
to
e9be3ce
Compare
tools/bin/circleci_push_explorer
Outdated
@@ -0,0 +1,45 @@ | |||
#!/bin/bash | |||
|
|||
set -ex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deliberately left as set -ex
to have insight on CI.
tools/bin/circleci_push_chainlink
Outdated
PROJECT_ROOT=`git rev-parse --show-toplevel` | ||
pushd $PROJECT_ROOT >/dev/null | ||
|
||
tools/bin/circleci_validate_if_versioned $circle_branch $circle_tag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe surround the bash environment variables with "quotation marks"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have other instances in the same file where we confidently don't surround with quotation marks, like the pushd
above. I'm going to leave this as is for now.
# if version tagged, but not master, error. Only master can have versions. | ||
if [ "$circle_branch" != "master" ] && [ -n "$circle_tag" ] | ||
then | ||
echo Not on master \(${circle_branch}\) with git tag version \(${circle_tag}\), erroring. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe quotations?
tools/bin/gittag2dockertag
Outdated
if [ -z "$1" ] | ||
then | ||
exit 0 # No tag, skip. | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [ -z "$1" ]; then ?
elif [[ "${branch}" =~ ^release\/([a-zA-Z0-9.]+) ]]; then | ||
echo "${BASH_REMATCH[1]}" | ||
echo "candidate-${BASH_REMATCH[1]}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
looks good as far as I can tell 👍 |
f5596d9
to
b987a2b
Compare
https://www.pivotaltracker.com/n/projects/2235105/stories/168396064
Key features are the support for git tags.
Chainlink Core only:
Explorer only:
Develop branch will update images with the tag
developer
Release candidates will be built when pushing to a branch like
release/0.0.2
, resulting in an imagesmartcontract/chainlink:candidate-0.0.2
andsmartcontract/explorer:candidate-0.0.2
.What isn't in this final PR, but we could readd, is an escape hatch for testing and debugging. I allowed
chores-v.*
to be built via tags in order for me to have confidence in the PR. If @thodges-gh you see a need for something like this, let me know.