From 9f37b3a4c251d7caaa2870952e217be369e8e9c1 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Mon, 20 May 2019 10:07:17 +0200 Subject: [PATCH] ci: deploy artifacts on azure --- .azure-pipelines/steps/run-script.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.azure-pipelines/steps/run-script.yml b/.azure-pipelines/steps/run-script.yml index cb8e8a629a7e6..bf18518e6b1ca 100644 --- a/.azure-pipelines/steps/run-script.yml +++ b/.azure-pipelines/steps/run-script.yml @@ -1,13 +1,14 @@ steps: -# Log time information from this machine and an external machine for insight into possible -# clock drift. Timezones don't matter since relative deltas give all the necessary info. + - bash: | + # Log time information from this machine and an external machine for insight into possible + # clock drift. Timezones don't matter since relative deltas give all the necessary info. date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true) - displayName: Log time information (before) -- bash: | which sccache stamp sh -x -c "$RUN_SCRIPT" + + date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true) env: CI: true CI_JOB_NAME: $(IMAGE) @@ -20,5 +21,15 @@ steps: displayName: Run script - bash: | - date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true) - displayName: Log time information (after) + deploy_dir=rustc-builds + if [ "$DEPLOY_ALT" == "1" ]; then + deploy_dir=rustc-builds-alt + fi + aws s3 cp --no-progress --recursive --acl public-read ./deploy s3://$DEPLOY_BUCKET/$deploy_dir + env: + # Explicitly decrypt secret variables + # See https://docs.microsoft.com/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#secret-variables + AWS_ACCESS_KEY_ID: $(SCCACHE_AWS_ACCESS_KEY_ID) + AWS_SECRET_ACCESS_KEY: $(SCCACHE_AWS_SECRET_ACCESS_KEY) + condition: and(succeeded(), or(eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1'))) + displayName: Upload artifacts