Skip to content

Commit

Permalink
CI (rootfs_utils): Require that the user explicitly specify the `tag_…
Browse files Browse the repository at this point in the history
…name` (#41571)
  • Loading branch information
DilumAluthge authored Jul 14, 2021
1 parent da28c17 commit 23dbf16
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .buildkite/rootfs_images/llvm-passes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
## Eventually, this image will probably be replaced with the actual builder image,
## as that will have the necessary toolchains as well, but that image is not built yet.

if length(ARGS) != 1
throw(ArgumentError("Usage: llvm-passes.jl [tag_name]"))
end
const tag_name = convert(String, strip(ARGS[1]))::String

include("rootfs_utils.jl")

# Build debian-based image with the following extra packages:
Expand All @@ -26,4 +31,4 @@ packages = [
tarball_path = debootstrap("llvm-passes"; packages)

# Upload it
upload_rootfs_image(tarball_path; tag_name = "v1")
upload_rootfs_image(tarball_path; tag_name)
2 changes: 1 addition & 1 deletion .buildkite/rootfs_images/rootfs_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ end

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

0 comments on commit 23dbf16

Please sign in to comment.