Skip to content

Commit

Permalink
ci: deploy artifacts on azure
Browse files Browse the repository at this point in the history
  • Loading branch information
pietroalbini committed May 20, 2019
1 parent d27cb82 commit 9f37b3a
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .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)
Expand All @@ -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

0 comments on commit 9f37b3a

Please sign in to comment.