Skip to content

Commit f4cf448

Browse files
committed
CI (Buildkite): upload musl64 nightly binaries to S3
1 parent 690517a commit f4cf448

File tree

3 files changed

+47
-1
lines changed

3 files changed

+47
-1
lines changed

.buildkite/pipelines/main/0_webui.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@ steps:
1919
# Our signed pipelines must have a `signature` or `signature_file` parameter that
2020
# verifies the treehash of the pipeline itself and the inputs listed in `inputs`
2121
signed_pipelines:
22-
- pipeline: .buildkite/pipelines/main/misc/signed_pipeline_test.yml
22+
- pipeline: .buildkite/pipelines/main/misc/signed_pipeline_test.yml
2323
signature_file: .buildkite/pipelines/main/misc/signed_pipeline_test.yml.signature
24+
- pipeline: .buildkite/pipelines/main/upload_s3/musl.yml
25+
signature_file: .buildkite/pipelines/main/upload_s3/musl.yml.signature
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
agents:
2+
queue: "julia"
3+
# Only run on `sandbox.jl` machines (not `docker`-isolated ones) since we need nestable sandboxing
4+
sandbox.jl: "true"
5+
os: "linux"
6+
7+
steps:
8+
- label: "upload_s3_musl64"
9+
key: upload_s3_musl64
10+
depends_on: package_musl64
11+
if: |
12+
(pipeline.slug == "julia-master") && (build.branch == "master") && (build.pull_request.id == null)
13+
commands: |
14+
echo "--- Print the full and short commit hashes"
15+
SHORT_COMMIT_LENGTH=10
16+
SHORT_COMMIT=`echo $${BUILDKITE_COMMIT:?} | cut -c1-$${SHORT_COMMIT_LENGTH:?}`
17+
ARTIFACT_FILENAME="julia-$${SHORT_COMMIT:?}-musl64.tar.gz"
18+
19+
echo "--- Download build artifacts"
20+
rm -rf $${ARTIFACT_FILENAME:?}
21+
buildkite-agent artifact download $${ARTIFACT_FILENAME:?} .
22+
23+
echo "--- Upload build artifacts to S3"
24+
# Upload to the following URL:
25+
# https://julialangnightlies-s3.julialang.org/bin/linux/x64/julia-latest-musl64.tar.gz
26+
export NEW_ARTIFACT_FILENAME="julia-latest-musl64.tar.gz"
27+
export BUILDKITE_ARTIFACT_UPLOAD_DESTINATION="s3://julialangnightlies-s3/bin/linux/x64"
28+
export BUILDKITE_S3_DEFAULT_REGION="us-east-1"
29+
if [[ "$${ARTIFACT_FILENAME:?}" != "$${NEW_ARTIFACT_FILENAME:?}" ]]; then
30+
mv $${ARTIFACT_FILENAME:?} $${NEW_ARTIFACT_FILENAME:?}
31+
fi
32+
33+
# From the Buildkite documentation:
34+
# > By default the agent will create objects with public-read permissions, so that
35+
# > clicking on an artifact link in the Buildkite web interface can go directly to the
36+
# > S3 object to be viewed in the browser.
37+
38+
buildkite-agent artifact upload $${ARTIFACT_FILENAME:?}
39+
timeout_in_minutes: 60
40+
41+
# We must accept the signed job id secret in order to propagate secrets
42+
env:
43+
BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET: ${BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET?}

.buildkite/pipelines/main/upload_s3/musl.yml.signature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Salted__j� �iE�.���� Z9���3r~G׾�Mւa�?��L,���^o�%���Z����8�2zX�h�p�J�j��7��

0 commit comments

Comments
 (0)