Skip to content

Commit 2f31ff9

Browse files
committed
CI: remove specific os version references
1 parent 42a5dd8 commit 2f31ff9

File tree

2 files changed

+6
-7
lines changed
  • ci/tasks
    • collect-base-amis
    • collect-gcp-image

2 files changed

+6
-7
lines changed

ci/tasks/collect-base-amis/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ version = File.read('version/number').chomp
4848

4949
base_ami = ENV['BASE_AMI']
5050
unless supported_base_ami.include? base_ami
51-
abort 'abort "Define BASE_AMI environment variable (i.e. windows2019)'
51+
abort 'Define BASE_AMI environment variable (ex: windows2135)'
5252
end
5353

5454
base_ami_name = ENV['BASE_AMI_NAME']

ci/tasks/collect-gcp-image/run

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/bin/bash
2-
3-
set -eo pipefail
2+
set -euo pipefail
43

54
ACCOUNT_EMAIL=$(echo "${ACCOUNT_JSON}" | jq -r .client_email)
65
PROJECT_ID=$(echo "${ACCOUNT_JSON}" | jq -r .project_id)
@@ -11,8 +10,8 @@ gcloud config set project "${PROJECT_ID}"
1110

1211
set -x
1312

14-
if [[ "$BASE_OS" != "windows2019" ]]; then
15-
echo "Define BASE_OS environment variable (i.e. windows2019)" 1>&2
13+
if [[ "${BASE_OS}" =~ windows[0-9]{4} ]]; then
14+
echo "Define BASE_OS environment variable (ex: windows2135)" 1>&2
1615
exit 1
1716
fi
1817

@@ -24,5 +23,5 @@ fi
2423
image_id=$(gcloud compute images list --filter="name~'${BASE_IMAGE_REGEX}'" --format json | jq -r .[0].name)
2524
version=$(cat version/number)
2625

27-
printf '{"base_image":"%s","image_family":"%s"}' "$image_id" "$IMAGE_FAMILY" > base-gcp-image/base-gcp-image-$BASE_OS-$version.json
28-
26+
printf '{"base_image":"%s","image_family":"%s"}' "$image_id" "$IMAGE_FAMILY" \
27+
> "base-gcp-image/base-gcp-image-${BASE_OS}-${version}.json"

0 commit comments

Comments
 (0)