diff --git a/bin/alias b/bin/alias new file mode 100644 index 0000000000..50969046fd --- /dev/null +++ b/bin/alias @@ -0,0 +1,12 @@ +#!/bin/bash + +set -eo pipefail + +[ ! -z $DOCKERHUB_REPO ] && [ $# -eq 2 ] + +VERSION="$1" +ALIAS="$2" + +docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS +docker tag $DOCKERHUB_REPO:$VERSION $DOCKERHUB_REPO:$ALIAS +docker push $DOCKERHUB_REPO:$ALIAS diff --git a/circle.yml b/circle.yml index 394437a752..ea21f094fd 100644 --- a/circle.yml +++ b/circle.yml @@ -18,16 +18,22 @@ test: override: - pytest --junitxml=$CIRCLE_TEST_REPORTS/junit.xml tests/ deployment: - latest: + master: branch: master owner: mozilla commands: - - ./bin/deploy "latest" - hub_releases: + - ./bin/deploy "master" + release: + branch: release + owner: mozilla + commands: + - ./bin/deploy "rc" + milestone: tag: /^m[0-9]+(\.[0-9]+)?$/ owner: mozilla commands: - ./bin/deploy "$CIRCLE_TAG" + - ./bin/alias "$CIRCLE_TAG" "latest" general: branches: ignore: