ci: deploy artifacts on azure

This commit is contained in:
Pietro Albini 2019-05-20 10:07:17 +02:00
parent d27cb827c6
commit 9f37b3a4c2
No known key found for this signature in database
GPG Key ID: 3E06ABE80BAAF19C
1 changed files with 18 additions and 7 deletions

View File

@ -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: |
date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
displayName: Log time information (before)
- 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)
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