Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxesn committed Dec 17, 2024
1 parent b71c4ad commit 96a361d
Show file tree
Hide file tree
Showing 9 changed files with 199 additions and 22 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ generate-staging-buildspec: | ensure-locale
build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "isc-projects_dhcp" "$(BASE_DIRECTORY)/projects/isc-projects/dhcp/buildspecs/batch-build.yml" "$(BASE_DIRECTORY)/buildspec.yml" true
build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "tinkerbell_hook" "$(BASE_DIRECTORY)/projects/tinkerbell/hook/buildspecs/batch-build.yml" "$(BASE_DIRECTORY)/buildspec.yml" true
build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "tinkerbell_ipxedust" "$(BASE_DIRECTORY)/projects/tinkerbell/ipxedust/buildspecs/batch-build.yml" "$(BASE_DIRECTORY)/buildspec.yml" true
build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "tinkerbell_rufio" "$(BASE_DIRECTORY)/projects/tinkerbell/rufio/buildspecs/batch-build.yml" "$(BASE_DIRECTORY)/buildspec.yml" true
build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "tinkerbell_tink" "$(BASE_DIRECTORY)/projects/tinkerbell/tink/buildspecs/batch-build.yml" "$(BASE_DIRECTORY)/buildspec.yml" true
build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "linuxkit_linuxkit" "$(BASE_DIRECTORY)/projects/linuxkit/linuxkit/buildspecs/batch-build.yml" "$(BASE_DIRECTORY)/buildspec.yml" true
build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "emissary-ingress_emissary" "$(BASE_DIRECTORY)/projects/emissary-ingress/emissary/buildspecs/batch-build.yml" "$(BASE_DIRECTORY)/buildspec.yml" true "DO_NOT_EXCLUDE_FROM_BUILDSPEC"
Expand Down
35 changes: 28 additions & 7 deletions build/lib/generate_staging_buildspec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,21 +182,42 @@ for project in "${PROJECTS[@]}"; do
fi

ARCH_TYPE="\"type\":\"$BUILDSPEC_PLATFORM\",\"compute-type\":\"$BUILDSPEC_COMPUTE_TYPE\","

if [[ "$BUILDSPECS_VAR" == "CHECKSUMS_BUILDSPECS" ]] && [[ "${BUILDSPEC_VARS_KEYS}" = "IMAGE_PLATFORMS" || ("$BUILDSPEC_VARS_KEYS" == "RELEASE_BRANCH" && "false" == "$(make_var $PROJECT_PATH BINARIES_ARE_RELEASE_BRANCHED)") ]]; then
BUILDSPEC_VARS_KEYS=""

BUILDSPEC_VARS_VALUES=""
if [[ "$BUILDSPECS_VAR" == "CHECKSUMS_BUILDSPECS" ]]; then
if [[ "true" == "$(make_var $PROJECT_PATH HAS_RELEASE_BRANCHES)" ]]; then
if [[ "false" == "$(make_var $PROJECT_PATH BINARIES_ARE_RELEASE_BRANCHED)" ]]; then
BUILDSPEC_VARS_KEYS=""
else
BUILDSPEC_VARS_KEYS="RELEASE_BRANCH"
BUILDSPEC_VARS_VALUES="SUPPORTED_K8S_VERSIONS"
fi
elif [[ "${BUILDSPEC_VARS_KEYS}" = "IMAGE_PLATFORMS" ]]; then
BUILDSPEC_VARS_KEYS=""
fi
fi

if [[ "$BUILDSPECS_VAR" == "UPGRADE_BUILDSPECS" ]] && [[ "${IDENTIFIER}" = "kubernetes_sigs_image_builder" ]]; then
BUILDSPEC_VARS_KEYS=""
if [[ "$BUILDSPECS_VAR" == "UPGRADE_BUILDSPECS" ]]; then
if [[ "${IDENTIFIER}" = "kubernetes_sigs_image_builder" ]]; then
BUILDSPEC_VARS_KEYS=""
elif [[ "true" == "$(make_var $PROJECT_PATH HAS_RELEASE_BRANCHES)" ]]; then
if [[ "false" == "$(make_var $PROJECT_PATH BINARIES_ARE_RELEASE_BRANCHED)" ]]; then
BUILDSPEC_VARS_KEYS=""
else
BUILDSPEC_VARS_KEYS="RELEASE_BRANCH"
BUILDSPEC_VARS_VALUES="SUPPORTED_K8S_VERSIONS"
fi
fi
fi

if [[ -n "$BUILDSPEC_VARS_KEYS" ]]; then
KEYS=(${BUILDSPEC_VARS_KEYS// / })

BUILDSPEC_VARS_VALUES=$(make_var $PROJECT_PATH BUILDSPEC_VARS_VALUES)
if [[ -z "$BUILDSPEC_VARS_VALUES" ]]; then
BUILDSPEC_VARS_VALUES=$(make_var $PROJECT_PATH BUILDSPEC_$((( $i + 1 )))_VARS_VALUES)
BUILDSPEC_VARS_VALUES=$(make_var $PROJECT_PATH BUILDSPEC_VARS_VALUES)
if [[ -z "$BUILDSPEC_VARS_VALUES" ]]; then
BUILDSPEC_VARS_VALUES=$(make_var $PROJECT_PATH BUILDSPEC_$((( $i + 1 )))_VARS_VALUES)
fi
fi
VARS=(${BUILDSPEC_VARS_VALUES// / })

Expand Down
3 changes: 1 addition & 2 deletions projects/aws/bottlerocket-bootstrap/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ BASE_IMAGE_NAME?=eks-distro-base
# the images target being the actual action, its version of the set takes prioirty and resets to empty
# setting it explicitly to empty here takes allows the combine-images override to take proirty
IMAGE_BUILD_ARGS=
DOCKERFILE_FOLDER=$(if $(filter bottlerocket-bootstrap-snow,$(IMAGE_NAME)),./docker/linux/snow,./docker/linux)

IMAGE_NAMES=bottlerocket-bootstrap bottlerocket-bootstrap-snow

Expand Down Expand Up @@ -90,8 +91,6 @@ $(TOOLS_BIN_DIR):
$(MOCKGEN): $(TOOLS_BIN_DIR)
GOBIN=$(TOOLS_BIN_DIR) $(GO) install github.com/golang/mock/[email protected]

bottlerocket-bootstrap-snow/images/%: DOCKERFILE_FOLDER=./docker/linux/snow

GIT_TAG:
echo 0.0.0 > $@

Expand Down
1 change: 1 addition & 0 deletions projects/kubernetes/cloud-provider-vsphere/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ HAS_RELEASE_BRANCHES=true
# the images target being the actual action, its version of the set takes prioirty and resets to empty
# setting it explicitly to empty here takes allows the combine-images override to take proirty
IMAGE_BUILD_ARGS=
DOCKERFILE_FOLDER=./docker/linux

BUILDSPECS=$(BUILDSPECS_FOR_COMBINE_IMAGES)
BUILDSPEC_1_COMPUTE_TYPE=BUILD_GENERAL1_LARGE
Expand Down
10 changes: 10 additions & 0 deletions projects/tinkerbell/rufio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ SOURCE_PATTERNS=.

HAS_S3_ARTIFACTS=true

# we need to set IMAGE_BUILD_ARGS here even though its the same as the default.
# it is set in Common.mk on the images target (https://github.com/aws/eks-anywhere-build-tooling/blob/8b6d6d66974e881b22e3c9c8ea29adc26f7df5fd/Common.mk#L799)
# and the combine-images target (https://github.com/aws/eks-anywhere-build-tooling/blob/8b6d6d66974e881b22e3c9c8ea29adc26f7df5fd/Common.mk#L846)
# since combine-images has images as prereq target, the ?= does not really behavior as one might expect.
# the images target being the actual action, its version of the set takes prioirty and resets to empty
# setting it explicitly to empty here takes allows the combine-images override to take proirty
IMAGE_BUILD_ARGS=
DOCKERFILE_FOLDER=./docker/linux
BUILDSPECS=$(BUILDSPECS_FOR_COMBINE_IMAGES)

include $(BASE_DIRECTORY)/Common.mk

s3-artifacts: create-manifests
Expand Down
51 changes: 51 additions & 0 deletions projects/tinkerbell/rufio/buildspecs/batch-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This file was generated by running `make generate`. DO NOT EDIT

batch:
fast-fail: true
build-graph:
- identifier: tinkerbell_rufio_linux_amd64
env:
type: LINUX_CONTAINER
compute-type: BUILD_GENERAL1_SMALL
variables:
IMAGE_PLATFORMS: linux/amd64
BINARY_PLATFORMS: linux/amd64
IMAGE_TAG_SUFFIX: -amd64
- identifier: tinkerbell_rufio_linux_arm64
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_SMALL
variables:
IMAGE_PLATFORMS: linux/arm64
BINARY_PLATFORMS: linux/arm64
IMAGE_TAG_SUFFIX: -arm64
- identifier: tinkerbell_rufio_combine_images
buildspec: buildspecs/combine-images.yml
depend-on:
- tinkerbell_rufio_linux_amd64
- tinkerbell_rufio_linux_arm64
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_SMALL
version: 0.2
phases:
pre_build:
commands:
- ./build/lib/setup.sh
build:
commands:
- if $(make check-project-path-exists) && make check-for-release-branch-skip -C $PROJECT_PATH; then make release -C $PROJECT_PATH; fi
41 changes: 39 additions & 2 deletions release/checksums-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,46 @@ batch:
PROJECT_PATH: projects/kubernetes/cloud-provider-aws
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes.cloud-provider-aws
RELEASE_BRANCH: 1-27
- identifier: kubernetes_cloud_provider_vsphere
- identifier: kubernetes_cloud_provider_vsphere_1_27
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_LARGE
variables:
PROJECT_PATH: projects/kubernetes/cloud-provider-vsphere
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes.cloud-provider-vsphere
RELEASE_BRANCH: 1-27
- identifier: kubernetes_cloud_provider_vsphere_1_28
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_LARGE
variables:
PROJECT_PATH: projects/kubernetes/cloud-provider-vsphere
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes.cloud-provider-vsphere
RELEASE_BRANCH: 1-28
- identifier: kubernetes_cloud_provider_vsphere_1_29
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_LARGE
variables:
PROJECT_PATH: projects/kubernetes/cloud-provider-vsphere
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes.cloud-provider-vsphere
RELEASE_BRANCH: 1-29
- identifier: kubernetes_cloud_provider_vsphere_1_30
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_LARGE
variables:
PROJECT_PATH: projects/kubernetes/cloud-provider-vsphere
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes.cloud-provider-vsphere
RELEASE_BRANCH: 1-30
- identifier: kubernetes_cloud_provider_vsphere_1_31
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_LARGE
variables:
PROJECT_PATH: projects/kubernetes/cloud-provider-vsphere
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes.cloud-provider-vsphere
RELEASE_BRANCH: 1-31
- identifier: kubernetes_sigs_cluster_api
env:
type: ARM_CONTAINER
Expand Down Expand Up @@ -524,7 +557,11 @@ batch:
- kubernetes_autoscaler_1_30
- kubernetes_autoscaler_1_31
- kubernetes_cloud_provider_aws_1_27
- kubernetes_cloud_provider_vsphere
- kubernetes_cloud_provider_vsphere_1_27
- kubernetes_cloud_provider_vsphere_1_28
- kubernetes_cloud_provider_vsphere_1_29
- kubernetes_cloud_provider_vsphere_1_30
- kubernetes_cloud_provider_vsphere_1_31
- kubernetes_sigs_cluster_api
- kubernetes_sigs_cluster_api_provider_cloudstack
- kubernetes_sigs_cluster_api_provider_vsphere
Expand Down
26 changes: 25 additions & 1 deletion release/staging-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,31 @@ batch:
PROJECT_PATH: projects/tinkerbell/ipxedust
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/tinkerbell.ipxedust
BINARY_PLATFORMS: linux/arm64
- identifier: tinkerbell_rufio
- identifier: tinkerbell_rufio_linux_amd64
env:
type: LINUX_CONTAINER
compute-type: BUILD_GENERAL1_SMALL
variables:
PROJECT_PATH: projects/tinkerbell/rufio
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/tinkerbell.rufio
IMAGE_PLATFORMS: linux/amd64
BINARY_PLATFORMS: linux/amd64
IMAGE_TAG_SUFFIX: -amd64
- identifier: tinkerbell_rufio_linux_arm64
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_SMALL
variables:
PROJECT_PATH: projects/tinkerbell/rufio
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/tinkerbell.rufio
IMAGE_PLATFORMS: linux/arm64
BINARY_PLATFORMS: linux/arm64
IMAGE_TAG_SUFFIX: -arm64
- identifier: tinkerbell_rufio_combine_images
buildspec: buildspecs/combine-images.yml
depend-on:
- tinkerbell_rufio_linux_amd64
- tinkerbell_rufio_linux_arm64
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_SMALL
Expand Down
53 changes: 43 additions & 10 deletions tools/version-tracker/buildspecs/upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,26 +244,46 @@ batch:
PROJECT_PATH: projects/kubernetes/cloud-provider-aws
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes.cloud-provider-aws
RELEASE_BRANCH: 1-27
- identifier: kubernetes_cloud_provider_vsphere_linux_amd64
- identifier: kubernetes_cloud_provider_vsphere_1_27
env:
type: LINUX_CONTAINER
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_LARGE
variables:
PROJECT_PATH: projects/kubernetes/cloud-provider-vsphere
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes.cloud-provider-vsphere
IMAGE_PLATFORMS: linux/amd64
BINARY_PLATFORMS: linux/amd64
IMAGE_TAG_SUFFIX: -amd64
- identifier: kubernetes_cloud_provider_vsphere_linux_arm64
RELEASE_BRANCH: 1-27
- identifier: kubernetes_cloud_provider_vsphere_1_28
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_LARGE
variables:
PROJECT_PATH: projects/kubernetes/cloud-provider-vsphere
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes.cloud-provider-vsphere
IMAGE_PLATFORMS: linux/arm64
BINARY_PLATFORMS: linux/arm64
IMAGE_TAG_SUFFIX: -arm64
RELEASE_BRANCH: 1-28
- identifier: kubernetes_cloud_provider_vsphere_1_29
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_LARGE
variables:
PROJECT_PATH: projects/kubernetes/cloud-provider-vsphere
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes.cloud-provider-vsphere
RELEASE_BRANCH: 1-29
- identifier: kubernetes_cloud_provider_vsphere_1_30
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_LARGE
variables:
PROJECT_PATH: projects/kubernetes/cloud-provider-vsphere
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes.cloud-provider-vsphere
RELEASE_BRANCH: 1-30
- identifier: kubernetes_cloud_provider_vsphere_1_31
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_LARGE
variables:
PROJECT_PATH: projects/kubernetes/cloud-provider-vsphere
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/kubernetes.cloud-provider-vsphere
RELEASE_BRANCH: 1-31
- identifier: kubernetes_sigs_cluster_api
env:
type: ARM_CONTAINER
Expand Down Expand Up @@ -425,13 +445,26 @@ batch:
IMAGE_PLATFORMS: linux/arm64
BINARY_PLATFORMS: linux/arm64
IMAGE_TAG_SUFFIX: -arm64
- identifier: tinkerbell_rufio
- identifier: tinkerbell_rufio_linux_amd64
env:
type: LINUX_CONTAINER
compute-type: BUILD_GENERAL1_SMALL
variables:
PROJECT_PATH: projects/tinkerbell/rufio
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/tinkerbell.rufio
IMAGE_PLATFORMS: linux/amd64
BINARY_PLATFORMS: linux/amd64
IMAGE_TAG_SUFFIX: -amd64
- identifier: tinkerbell_rufio_linux_arm64
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_SMALL
variables:
PROJECT_PATH: projects/tinkerbell/rufio
CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/tinkerbell.rufio
IMAGE_PLATFORMS: linux/arm64
BINARY_PLATFORMS: linux/arm64
IMAGE_TAG_SUFFIX: -arm64
- identifier: tinkerbell_tink_linux_amd64
env:
type: LINUX_CONTAINER
Expand Down

0 comments on commit 96a361d

Please sign in to comment.