From: Dylan William Hardison Date: Mon, 7 Aug 2017 18:51:00 +0000 (-0400) Subject: Bug 1383355 - nit only push to latest for the master branch X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08119e76728f7ff88fb2408476175c039335b879;p=thirdparty%2Fbugzilla.git Bug 1383355 - nit only push to latest for the master branch --- 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: