Skip to content

Commit

Permalink
CI (Buildkite): include the short commit hash in the artifact filename (
Browse files Browse the repository at this point in the history
  • Loading branch information
DilumAluthge authored Jul 26, 2021
1 parent e6e79f7 commit 343c2b1
Showing 1 changed file with 16 additions and 4 deletions.
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

0 comments on commit 343c2b1

Please sign in to comment.