summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-08-17 18:51:58 +0200
committerGitHub <noreply@github.com>2018-08-17 18:51:58 +0200
commit4a154cbf7bb41e707c5950828ca1b2658d436609 (patch)
tree74f0ae17f3199c7eec48428b7676948bc7f04bed
parentae9885389d3ce428f24e0352814b70b099fadb95 (diff)
downloadbugzilla-4a154cbf7bb41e707c5950828ca1b2658d436609.tar.gz
bugzilla-4a154cbf7bb41e707c5950828ca1b2658d436609.tar.xz
change how builds work slightly
-rw-r--r--.circleci/config.yml30
1 files changed, 17 insertions, 13 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index d8c30f717..fe1263ee9 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -149,22 +149,26 @@ jobs:
- *store_log
- deploy:
command: |
- TAG="$(cat /app/build_info/tag.txt)"
- [[ "$CIRCLE_BRANCH" == "master" ]] || exit 0
[[ -n "$DOCKERHUB_REPO" && -n "$DOCKER_USER" && -n "$DOCKER_PASS" ]] || exit 0
- [[ -n "$GITHUB_PERSONAL_TOKEN" ]] || exit 0
docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
- 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"
+ if [[ "$CIRCLE_BRANCH" == "master" ]]; then
+ TAG="$(cat /app/build_info/tag.txt)"
+ if [[ -n "$TAG" && -f build_info/publish.txt ]]; then
+ [[ -n "$GITHUB_PERSONAL_TOKEN" ]] || exit 0
+ 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"
+ else
+ docker tag bmo "$DOCKERHUB_REPO:$CIRCLE_BRANCH"
+ docker push "$DOCKERHUB_REPO:$CIRCLE_BRANCH"
fi
- docker tag bmo "$DOCKERHUB_REPO:latest"
- docker push "$DOCKERHUB_REPO:latest"
test_sanity:
parallelism: 1