Skip to content

CI (Buildkite): include the short commit hash in the artifact filename #41700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .buildkite/pipelines/main/platforms/linux64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ steps:
# Include `/cache/repos` so that our `git` version introspection works.
- "/cache/repos:/cache/repos"
commands: |
echo "--- Print the short and long commit hashes"
SHORT_COMMIT_LENGTH=10
SHORT_COMMIT=`echo $$BUILDKITE_COMMIT | cut -c1-$$SHORT_COMMIT_LENGTH`
JULIA_DIRECTORY_NAME="julia-$$SHORT_COMMIT"
JULIA_BINARYDIST_FILENAME=`make print-JULIA_BINARYDIST_FILENAME | cut -c27-`
ARTIFACT_FILE_EXTENSION="tar.gz"
ARTIFACT_FILENAME="$$JULIA_BINARYDIST_FILENAME.$$ARTIFACT_FILE_EXTENSION"
echo "The full commit is $$BUILDKITE_COMMIT"
echo "The Julia directory name will be $$JULIA_DIRECTORY_NAME"
echo "The artifact filename will be $$ARTIFACT_FILENAME"

echo "--- Build Julia from source"
make -j 6
make release
Expand All @@ -28,12 +39,13 @@ steps:
./julia -e 'using InteractiveUtils; InteractiveUtils.versioninfo()'

echo "--- Compress build artifacts"
mv julia-* julia-artifact
rm -rf julia-linux64.tar.gz
tar czf julia-linux64.tar.gz julia-artifact/
ls -ld $$JULIA_DIRECTORY_NAME/
rm -rf $$ARTIFACT_FILENAME
tar czf $$ARTIFACT_FILENAME $$JULIA_DIRECTORY_NAME/
ls -l $$ARTIFACT_FILENAME

echo "--- Upload build artifacts"
buildkite-agent artifact upload julia-linux64.tar.gz
buildkite-agent artifact upload $$ARTIFACT_FILENAME
timeout_in_minutes: 60
notify:
- github_commit_status:
Expand Down