summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-08-07 20:51:00 +0200
committerGitHub <noreply@github.com>2017-08-07 20:51:00 +0200
commit08119e76728f7ff88fb2408476175c039335b879 (patch)
tree090bde62512f1b398810e5ddda86eddef4e821a4
parent4663032035039cc642db9b3f82b289418d02c430 (diff)
downloadbugzilla-08119e76728f7ff88fb2408476175c039335b879.tar.gz
bugzilla-08119e76728f7ff88fb2408476175c039335b879.tar.xz
Bug 1383355 - nit only push to latest for the master branch
-rw-r--r--.circleci/config.yml12
1 files changed, 8 insertions, 4 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index b4fbe1874..e4fd5c53e 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -54,10 +54,14 @@ jobs:
command: apk update && apk add git openssh-client
- checkout
- run: |
- docker build -t $DOCKERHUB_REPO:latest .
- if [[ -n "$DOCKER_USER" && -n "$DOCKER_PASS" ]]; then
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
- docker push $DOCKERHUB_REPO:latest
+ docker build -t bmo .
+ if [[ -n "$DOCKERHUB_REPO" && -n "$DOCKER_USER" && -n "$DOCKER_PASS" ]]; then
+ TAG="$CIRCLE_BRANCH"
+ if [[ $TAG == "master" ]]; then
+ docker tag bmo $DOCKERHUB_REPO:$TAG
+ docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
+ docker push $DOCKERHUB_REPO:latest
+ fi
fi
test_sanity: