Skip to content

Commit

Permalink
Merge pull request #1747 from smartcontractkit/hotfix/v0.6.9
Browse files Browse the repository at this point in the history
0.6.9 hotfix, correctly quote bash vars in case empty string
  • Loading branch information
j16r authored Oct 4, 2019
2 parents af934c0 + cb02ea4 commit 0f41bad
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 48 deletions.
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ jobs:
- run:
name: Docker push, if applicable
command: |
tools/ci/push_explorer ${CIRCLE_BRANCH} ${CIRCLE_TAG}
tools/ci/push_explorer "${CIRCLE_BRANCH}" "${CIRCLE_TAG}"
build-publish-chainlink:
machine: true
steps:
Expand All @@ -264,7 +264,7 @@ jobs:
- run:
name: Docker push, if applicable
command: |
tools/ci/push_chainlink ${CIRCLE_BRANCH} ${CIRCLE_TAG}
tools/ci/push_chainlink "${CIRCLE_BRANCH}" "${CIRCLE_TAG}"
reportcoverage:
docker:
- image: smartcontract/builder:1.0.22
Expand All @@ -278,9 +278,9 @@ workflows:
test:
jobs:
- go-sqlite:
filters:
filters: # all branches, and /^v../ tags for build-publish...
tags:
only: /^v.*/ # all branches, and tags with this prefix. for build-publish...
only: /^v.*/
- go-sqlite-race:
filters:
tags:
Expand Down Expand Up @@ -310,9 +310,9 @@ workflows:
tags:
only: /^v.*/
- explorer:
filters:
filters: # all branches, and /^explorer-v../ tags for build-publish...
tags:
only: /^explorer-v.*/ # all branches and tags with this prefix. for build-publish...
only: /^explorer-v.*/
- build-publish-explorer:
requires:
- explorer
Expand All @@ -322,7 +322,7 @@ workflows:
- develop
- /^release\/.*/
tags:
only: /^explorer-v.*/ # handles final versioned releases instead of master branch
only: /^explorer-v.*/ # handles final versioned releases
- build-publish-chainlink:
requires:
- go-sqlite
Expand All @@ -339,7 +339,7 @@ workflows:
- develop
- /^release\/.*/
tags:
only: /^v.*/ # handles final versioned releases instead of master branch
only: /^v.*/ # handles final versioned releases
- reportcoverage:
requires:
- go-sqlite
Expand Down
3 changes: 1 addition & 2 deletions tools/ci/branch2tag
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ elif [ "${branch}" = "master" ]; then
elif [[ "${branch}" =~ ^release\/([a-zA-Z0-9.]+) ]]; then
echo "candidate-${BASH_REMATCH[1]}"
else
echo unable to deduce docker tag from ${branch}
exit 1
echo "unknown"
fi
2 changes: 1 addition & 1 deletion tools/ci/gittag2dockertag
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ if [[ "${gittag}" =~ ^v([a-zA-Z0-9.]+) ]]; then
elif [[ "${gittag}" =~ ^explorer-v([a-zA-Z0-9.]+) ]]; then
echo "${BASH_REMATCH[1]}"
else
echo unable to deduce docker tag from ${gittag}
echo "unable to deduce docker tag from git tag ${gittag}"
exit 1
fi
10 changes: 4 additions & 6 deletions tools/ci/push_chainlink
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ set -ex
# to work with.
#

circle_branch=$1
circle_tag=$2
circle_branch="$1"
circle_tag="$2"

PROJECT_ROOT=`git rev-parse --show-toplevel`
pushd $PROJECT_ROOT >/dev/null

tools/ci/validate_if_versioned $circle_branch $circle_tag

tag_and_push() {
# ie: docker tag and push smartcontract/chainlink:0.9.1, since DOCKER_TAG=0.9.1
export DOCKER_TAG=$1
Expand All @@ -35,10 +33,10 @@ version_tag=`tools/ci/gittag2dockertag ${circle_tag}` # aka GIT_TAG. v0.9.1 -> 0

# version tag takes precedence.
if [ -n "${version_tag}" ]; then
tag_and_push $version_tag
tag_and_push "$version_tag"
# if version tag, also push latest.
# ie: after pushing smartcontract/chainlink:0.6.9, also update smartcontract/chainlink:latest
tag_and_push latest
else
tag_and_push $branch_tag
tag_and_push "$branch_tag"
fi
10 changes: 4 additions & 6 deletions tools/ci/push_explorer
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ set -ex
# to work with.
#

circle_branch=$1
circle_tag=$2
circle_branch="$1"
circle_tag="$2"

PROJECT_ROOT=`git rev-parse --show-toplevel`
pushd $PROJECT_ROOT >/dev/null

tools/ci/validate_if_versioned $circle_branch $circle_tag

tag_and_push() {
# ie: docker tag and push smartcontract/explorer:0.9.1, since DOCKER_TAG=0.9.1
export DOCKER_TAG=$1
Expand All @@ -35,10 +33,10 @@ version_tag=`tools/ci/gittag2dockertag ${circle_tag}` # aka GIT_TAG. explorer-v0

# version tag takes precedence.
if [ -n "${version_tag}" ]; then
tag_and_push $version_tag
tag_and_push "$version_tag"
# if version tag, also push latest.
# ie: after pushing smartcontract/explorer:0.6.9, also update smartcontract/explorer:latest
tag_and_push latest
else
tag_and_push $branch_tag
tag_and_push "$branch_tag"
fi
25 changes: 0 additions & 25 deletions tools/ci/validate_if_versioned

This file was deleted.

0 comments on commit 0f41bad

Please sign in to comment.