From abc164e7c60eb27459534e2d6bf128ee765202a2 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Sat, 26 Nov 2016 17:54:17 -0500 Subject: [PATCH] circleci-matrix: Push images as part of the test step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To workaround, CircleCI limitation [1]: "Please note that since we do not support parallel deployment, specifying ‘parallel:true’ in the deployment phase will cause an error." This commit moves the deployment step as the last action of the test step. Doing so will ensure, every container will take care of pushing images it was responsible to build. [1] https://circleci.com/docs/parallel-manual-setup/#simple-example --- .circleci-matrix.yml | 3 ++- circle.yml | 13 ++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.circleci-matrix.yml b/.circleci-matrix.yml index cc50400..4201e3d 100644 --- a/.circleci-matrix.yml +++ b/.circleci-matrix.yml @@ -1,3 +1,4 @@ + env: - IMAGE=android-arm - IMAGE=browser-asmjs @@ -80,7 +81,7 @@ command: mkdir -p ~/docker; time docker save dockcross/$IMAGE > ~/docker/$IMAGE.tar echo "Saving dockcross/$IMAGE into ~/docker cache - done" fi - if [[ $STEP == "deployment" ]]; then + if [[ $STEP == "deployment" ]] && [[ "$CIRCLE_BRANCH" == "master" ]]; then echo "Docker login" docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS echo "Docker login - done" diff --git a/circle.yml b/circle.yml index 2b6cf7d..28db1ad 100644 --- a/circle.yml +++ b/circle.yml @@ -26,13 +26,8 @@ test: timeout: 3000 environment: STEP: test + - circleci-matrix: + parallel: true + environment: + STEP: deployment -deployment: - hub: - branch: master - commands: - - circleci-matrix: - parallel: true - timeout: 1800 - environment: - STEP: deployment