Merge pull request #71970 from johanot/create-gce-nitpick

scripts/gce: make image name configurable
This commit is contained in:
Jörg Thalheim
2019-10-25 14:28:06 +01:00
committed by GitHub

View File

@@ -15,7 +15,7 @@ nix-build '<nixpkgs/nixos/lib/eval-config.nix>' \
-j 10
img_path=$(echo gce/*.tar.gz)
img_name=$(basename "$img_path")
img_name=${IMAGE_NAME:-$(basename "$img_path")}
img_id=$(echo "$img_name" | sed 's|.raw.tar.gz$||;s|\.|-|g;s|_|-|g')
if ! gsutil ls "gs://${BUCKET_NAME}/$img_name"; then
gsutil cp "$img_path" "gs://${BUCKET_NAME}/$img_name"