diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-03-28 19:36:27 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-03-28 19:36:27 +0200 |
commit | 3ef33b34236a7341e668887e89ceb19ca8d16b4f (patch) | |
tree | 54853e2b190bc6576925d9ec1322784c85d19cb9 /.circleci | |
parent | b14d36c66500ca6d57df8cfe310557204eccc5f2 (diff) | |
download | bugzilla-3ef33b34236a7341e668887e89ceb19ca8d16b4f.tar.gz bugzilla-3ef33b34236a7341e668887e89ceb19ca8d16b4f.tar.xz |
no bug - always build latest tag
Diffstat (limited to '.circleci')
-rw-r--r-- | .circleci/config.yml | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index e30304b63..1743d7451 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -141,18 +141,21 @@ jobs: - deploy: command: | TAG="$(cat /app/build_info/tag.txt)" - [[ "$CIRCLE_BRANCH" == "master" && -n "$TAG" ]] || exit 0 + [[ "$CIRCLE_BRANCH" == "master" ]] || exit 0 [[ -n "$DOCKERHUB_REPO" && -n "$DOCKER_USER" && -n "$DOCKER_PASS" ]] || exit 0 [[ -n "$GITHUB_PERSONAL_TOKEN" ]] || exit 0 - [[ -f build_info/publish.txt ]] || exit 0 - git config credential.helper cache - git config user.email "$GITHUB_EMAIL" - git config user.name "$GITHUB_NAME" - git tag $TAG - git push https://${GITHUB_PERSONAL_TOKEN}:x-oauth-basic@github.com/$GITHUB_REPO.git $TAG - docker tag bmo "$DOCKERHUB_REPO:$TAG" docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" - docker push "$DOCKERHUB_REPO:$TAG" + if [[ -n "$TAG" && -f build_info/publish.txt ]]; then + git config credential.helper "cache --timeout 120" + git config user.email "$GITHUB_EMAIL" + git config user.name "$GITHUB_NAME" + git tag $TAG + git push https://${GITHUB_PERSONAL_TOKEN}:x-oauth-basic@github.com/$GITHUB_REPO.git $TAG + docker tag bmo "$DOCKERHUB_REPO:$TAG" + docker push "$DOCKERHUB_REPO:$TAG" + fi + docker tag bmo "$DOCKERHUB_REPO:latest" + docker push "$DOCKERHUB_REPO:latest" test_sanity: parallelism: 2 |