Skip to content

Commit

Permalink
Add IMAGE_OS_VERSION to image-builder buildspecs (#3297)
Browse files Browse the repository at this point in the history
Co-authored-by: Abhay Krishna Arunachalam <[email protected]>
  • Loading branch information
eks-distro-pr-bot and abhay-krishna authored Jun 12, 2024
1 parent c6b683b commit 4723209
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
7 changes: 6 additions & 1 deletion build/lib/generate_staging_buildspec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,14 @@ for project in "${PROJECTS[@]}"; do
for val2 in "${ARR_2[@]}"; do
BUILDSPEC_NAME=$(basename $buildspec .yml)
IDENTIFIER=${org//-/_}_${repo//-/_}_${val1//-/_}_${val2//-/_}_${BUILDSPEC_NAME//-/_}
# TODO: revisit this to make it more dynamic if other projects need it in the future
EXTRA_VARS=""
if [[ "$IDENTIFIER" =~ "kubernetes_sigs_image_builder_bottlerocket" ]]; then
EXTRA_VARS+=",\"IMAGE_OS_VERSION\":\"1\""
fi
ALL_PROJECT_IDS+="\"$IDENTIFIER\","
yq eval -i -P \
".batch.build-graph += [{\"identifier\":\"$IDENTIFIER\",$buildspec_field$DEPEND_ON\"env\":{$ARCH_TYPE\"variables\":{\"PROJECT_PATH\": \"projects/$org/$repo\"$CLONE_URL,\"${KEYS[0]}\":\"$val1\",\"${KEYS[1]}\":\"$val2\"}}}]" \
".batch.build-graph += [{\"identifier\":\"$IDENTIFIER\",$buildspec_field$DEPEND_ON\"env\":{$ARCH_TYPE\"variables\":{\"PROJECT_PATH\": \"projects/$org/$repo\"$CLONE_URL,\"${KEYS[0]}\":\"$val1\",\"${KEYS[1]}\":\"$val2\"$EXTRA_VARS}}}]" \
$STAGING_BUILDSPEC_FILE
done
done
Expand Down
15 changes: 15 additions & 0 deletions release/staging-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ batch:
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes-sigs.image-builder
IMAGE_OS: bottlerocket
RELEASE_BRANCH: 1-25
IMAGE_OS_VERSION: "1"
- identifier: kubernetes_sigs_image_builder_bottlerocket_1_26_ova
buildspec: projects/kubernetes-sigs/image-builder/buildspecs/ova.yml
env:
Expand All @@ -410,6 +411,7 @@ batch:
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes-sigs.image-builder
IMAGE_OS: bottlerocket
RELEASE_BRANCH: 1-26
IMAGE_OS_VERSION: "1"
- identifier: kubernetes_sigs_image_builder_bottlerocket_1_27_ova
buildspec: projects/kubernetes-sigs/image-builder/buildspecs/ova.yml
env:
Expand All @@ -420,6 +422,7 @@ batch:
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes-sigs.image-builder
IMAGE_OS: bottlerocket
RELEASE_BRANCH: 1-27
IMAGE_OS_VERSION: "1"
- identifier: kubernetes_sigs_image_builder_bottlerocket_1_28_ova
buildspec: projects/kubernetes-sigs/image-builder/buildspecs/ova.yml
env:
Expand All @@ -430,6 +433,7 @@ batch:
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes-sigs.image-builder
IMAGE_OS: bottlerocket
RELEASE_BRANCH: 1-28
IMAGE_OS_VERSION: "1"
- identifier: kubernetes_sigs_image_builder_bottlerocket_1_29_ova
buildspec: projects/kubernetes-sigs/image-builder/buildspecs/ova.yml
env:
Expand All @@ -440,6 +444,7 @@ batch:
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes-sigs.image-builder
IMAGE_OS: bottlerocket
RELEASE_BRANCH: 1-29
IMAGE_OS_VERSION: "1"
- identifier: kubernetes_sigs_image_builder_bottlerocket_1_25_raw
buildspec: projects/kubernetes-sigs/image-builder/buildspecs/raw.yml
env:
Expand All @@ -450,6 +455,7 @@ batch:
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes-sigs.image-builder
IMAGE_OS: bottlerocket
RELEASE_BRANCH: 1-25
IMAGE_OS_VERSION: "1"
- identifier: kubernetes_sigs_image_builder_bottlerocket_1_26_raw
buildspec: projects/kubernetes-sigs/image-builder/buildspecs/raw.yml
env:
Expand All @@ -460,6 +466,7 @@ batch:
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes-sigs.image-builder
IMAGE_OS: bottlerocket
RELEASE_BRANCH: 1-26
IMAGE_OS_VERSION: "1"
- identifier: kubernetes_sigs_image_builder_bottlerocket_1_27_raw
buildspec: projects/kubernetes-sigs/image-builder/buildspecs/raw.yml
env:
Expand All @@ -470,6 +477,7 @@ batch:
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes-sigs.image-builder
IMAGE_OS: bottlerocket
RELEASE_BRANCH: 1-27
IMAGE_OS_VERSION: "1"
- identifier: kubernetes_sigs_image_builder_bottlerocket_1_28_raw
buildspec: projects/kubernetes-sigs/image-builder/buildspecs/raw.yml
env:
Expand All @@ -480,6 +488,7 @@ batch:
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes-sigs.image-builder
IMAGE_OS: bottlerocket
RELEASE_BRANCH: 1-28
IMAGE_OS_VERSION: "1"
- identifier: kubernetes_sigs_image_builder_bottlerocket_1_29_raw
buildspec: projects/kubernetes-sigs/image-builder/buildspecs/raw.yml
env:
Expand All @@ -490,6 +499,7 @@ batch:
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes-sigs.image-builder
IMAGE_OS: bottlerocket
RELEASE_BRANCH: 1-29
IMAGE_OS_VERSION: "1"
- identifier: kubernetes_sigs_image_builder_bottlerocket_1_25_ami
buildspec: projects/kubernetes-sigs/image-builder/buildspecs/ami.yml
env:
Expand All @@ -500,6 +510,7 @@ batch:
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes-sigs.image-builder
IMAGE_OS: bottlerocket
RELEASE_BRANCH: 1-25
IMAGE_OS_VERSION: "1"
- identifier: kubernetes_sigs_image_builder_bottlerocket_1_26_ami
buildspec: projects/kubernetes-sigs/image-builder/buildspecs/ami.yml
env:
Expand All @@ -510,6 +521,7 @@ batch:
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes-sigs.image-builder
IMAGE_OS: bottlerocket
RELEASE_BRANCH: 1-26
IMAGE_OS_VERSION: "1"
- identifier: kubernetes_sigs_image_builder_bottlerocket_1_27_ami
buildspec: projects/kubernetes-sigs/image-builder/buildspecs/ami.yml
env:
Expand All @@ -520,6 +532,7 @@ batch:
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes-sigs.image-builder
IMAGE_OS: bottlerocket
RELEASE_BRANCH: 1-27
IMAGE_OS_VERSION: "1"
- identifier: kubernetes_sigs_image_builder_bottlerocket_1_28_ami
buildspec: projects/kubernetes-sigs/image-builder/buildspecs/ami.yml
env:
Expand All @@ -530,6 +543,7 @@ batch:
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes-sigs.image-builder
IMAGE_OS: bottlerocket
RELEASE_BRANCH: 1-28
IMAGE_OS_VERSION: "1"
- identifier: kubernetes_sigs_image_builder_bottlerocket_1_29_ami
buildspec: projects/kubernetes-sigs/image-builder/buildspecs/ami.yml
env:
Expand All @@ -540,6 +554,7 @@ batch:
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes-sigs.image-builder
IMAGE_OS: bottlerocket
RELEASE_BRANCH: 1-29
IMAGE_OS_VERSION: "1"
- identifier: kubernetes_sigs_kind
buildspec: buildspecs/binaries.yml
env:
Expand Down
5 changes: 5 additions & 0 deletions tools/version-tracker/buildspecs/upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ batch:
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes-sigs.image-builder
IMAGE_OS: bottlerocket
RELEASE_BRANCH: 1-25
IMAGE_OS_VERSION: "1"
- identifier: kubernetes_sigs_image_builder_bottlerocket_1_26_upgrade_buildspec
env:
type: ARM_CONTAINER
Expand All @@ -242,6 +243,7 @@ batch:
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes-sigs.image-builder
IMAGE_OS: bottlerocket
RELEASE_BRANCH: 1-26
IMAGE_OS_VERSION: "1"
- identifier: kubernetes_sigs_image_builder_bottlerocket_1_27_upgrade_buildspec
env:
type: ARM_CONTAINER
Expand All @@ -251,6 +253,7 @@ batch:
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes-sigs.image-builder
IMAGE_OS: bottlerocket
RELEASE_BRANCH: 1-27
IMAGE_OS_VERSION: "1"
- identifier: kubernetes_sigs_image_builder_bottlerocket_1_28_upgrade_buildspec
env:
type: ARM_CONTAINER
Expand All @@ -260,6 +263,7 @@ batch:
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes-sigs.image-builder
IMAGE_OS: bottlerocket
RELEASE_BRANCH: 1-28
IMAGE_OS_VERSION: "1"
- identifier: kubernetes_sigs_image_builder_bottlerocket_1_29_upgrade_buildspec
env:
type: ARM_CONTAINER
Expand All @@ -269,6 +273,7 @@ batch:
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes-sigs.image-builder
IMAGE_OS: bottlerocket
RELEASE_BRANCH: 1-29
IMAGE_OS_VERSION: "1"
- identifier: kubernetes_sigs_kind
env:
type: ARM_CONTAINER
Expand Down

0 comments on commit 4723209

Please sign in to comment.