Skip to content

Commit

Permalink
CI (Buildkite): rootfs_images: allow user to override the default val…
Browse files Browse the repository at this point in the history
…ue of `tag_name` (#41549)

(cherry picked from commit a9232d6)
  • Loading branch information
DilumAluthge authored and KristofferC committed Jul 19, 2021
1 parent e40d280 commit 875229c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .buildkite/rootfs_images/llvm-passes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ packages = [
tarball_path = debootstrap("llvm-passes"; packages)

# Upload it
upload_rootfs_image(tarball_path)
upload_rootfs_image(tarball_path; tag_name = "v1")
5 changes: 3 additions & 2 deletions .buildkite/rootfs_images/rootfs_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ function debootstrap(name::String; release::String="buster", variant::String="mi
return tarball_path
end

function upload_rootfs_image(tarball_path::String; github_repo::String="JuliaCI/rootfs-images")
function upload_rootfs_image(tarball_path::String;
github_repo::String="JuliaCI/rootfs-images",
tag_name::String="v1")
# Upload it to `github_repo`
tag_name = "v1"
tarball_url = "https://github.com/$(github_repo)/releases/download/$(tag_name)/$(basename(tarball_path))"
@info("Uploading to $(github_repo)@$(tag_name)", tarball_url)
run(`$(ghr_jll.ghr()) -u $(dirname(github_repo)) -r $(basename(github_repo)) -replace $(tag_name) $(tarball_path)`)
Expand Down

0 comments on commit 875229c

Please sign in to comment.