Skip to content

Commit 9f37b3a

Browse files
committed
ci: deploy artifacts on azure
1 parent d27cb82 commit 9f37b3a

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

.azure-pipelines/steps/run-script.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
steps:
2-
# Log time information from this machine and an external machine for insight into possible
3-
# clock drift. Timezones don't matter since relative deltas give all the necessary info.
2+
43
- bash: |
4+
# Log time information from this machine and an external machine for insight into possible
5+
# clock drift. Timezones don't matter since relative deltas give all the necessary info.
56
date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
6-
displayName: Log time information (before)
77
8-
- bash: |
98
which sccache
109
stamp sh -x -c "$RUN_SCRIPT"
10+
11+
date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
1112
env:
1213
CI: true
1314
CI_JOB_NAME: $(IMAGE)
@@ -20,5 +21,15 @@ steps:
2021
displayName: Run script
2122

2223
- bash: |
23-
date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
24-
displayName: Log time information (after)
24+
deploy_dir=rustc-builds
25+
if [ "$DEPLOY_ALT" == "1" ]; then
26+
deploy_dir=rustc-builds-alt
27+
fi
28+
aws s3 cp --no-progress --recursive --acl public-read ./deploy s3://$DEPLOY_BUCKET/$deploy_dir
29+
env:
30+
# Explicitly decrypt secret variables
31+
# See https://docs.microsoft.com/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#secret-variables
32+
AWS_ACCESS_KEY_ID: $(SCCACHE_AWS_ACCESS_KEY_ID)
33+
AWS_SECRET_ACCESS_KEY: $(SCCACHE_AWS_SECRET_ACCESS_KEY)
34+
condition: and(succeeded(), or(eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1')))
35+
displayName: Upload artifacts

0 commit comments

Comments
 (0)