Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

standardize batch builds for archd images #2682

Merged
merged 1 commit into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 23 additions & 9 deletions Common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ else
endif
EXCLUDE_FROM_STAGING_BUILDSPEC?=false
EXCLUDE_FROM_CHECKSUMS_BUILDSPEC?=false
DO_NOT_EXCLUDE_FROM_BUILDSPEC=false
BUILDSPECS?=buildspec.yml
CHECKSUMS_BUILDSPECS?=buildspecs/checksums-buildspec.yml
BUILDSPEC_VARS_KEYS?=
Expand All @@ -88,6 +89,7 @@ GIT_CHECKOUT_TARGET?=$(REPO)/eks-anywhere-checkout-$(GIT_TAG)
GIT_PATCH_TARGET?=$(REPO)/eks-anywhere-patched
REPO_NO_CLONE?=false
PATCHES_DIR=$(or $(wildcard $(PROJECT_ROOT)/patches),$(wildcard $(MAKE_ROOT)/patches))
HELM_PATCHES_DIR=$(or $(wildcard $(PROJECT_ROOT)/helm/patches),$(wildcard $(MAKE_ROOT)/helm/patches))
REPO_SPARSE_CHECKOUT?=
####################################################

Expand All @@ -102,7 +104,7 @@ IS_RELEASE_BRANCH_BUILD=$(filter true,$(HAS_RELEASE_BRANCHES))
UNRELEASE_BRANCH_BINARY_TARGETS=binaries attribution checksums
IS_UNRELEASE_BRANCH_TARGET=$(and $(filter false,$(BINARIES_ARE_RELEASE_BRANCHED)),$(filter $(UNRELEASE_BRANCH_BINARY_TARGETS) $(foreach target,$(UNRELEASE_BRANCH_BINARY_TARGETS),run-$(target)-in-docker run-in-docker/$(target)),$(MAKECMDGOALS)))
TARGETS_ALLOWED_WITH_NO_RELEASE_BRANCH?=
TARGETS_ALLOWED_WITH_NO_RELEASE_BRANCH+=build release clean clean-extra clean-go-cache help start-docker-builder stop-docker-builder create-ecr-repos all-attributions all-checksums all-attributions-checksums update-patch-numbers check-for-release-branch-skip run-buildkit-and-registry $(if $(filter false, $(HAS_LICENSES)),attribution,)
TARGETS_ALLOWED_WITH_NO_RELEASE_BRANCH+=build release clean clean-extra clean-go-cache help start-docker-builder stop-docker-builder create-ecr-repos all-attributions all-checksums all-attributions-checksums update-patch-numbers check-for-release-branch-skip run-buildkit-and-registry $(if $(filter false, $(HAS_LICENSES)),attribution,) $(if $(filter true, $(HAS_HELM_CHART)),,helm/push)
MAKECMDGOALS_WITHOUT_VAR_VALUE=$(foreach t,$(MAKECMDGOALS),$(if $(findstring var-value-,$(t)),,$(t)))
ifneq ($(and $(IS_RELEASE_BRANCH_BUILD),$(or $(RELEASE_BRANCH),$(IS_UNRELEASE_BRANCH_TARGET))),)
RELEASE_BRANCH_SUFFIX=$(if $(filter true,$(BINARIES_ARE_RELEASE_BRANCHED)),/$(RELEASE_BRANCH),)
Expand All @@ -122,8 +124,10 @@ else ifneq ($(and $(IS_RELEASE_BRANCH_BUILD), $(filter-out $(TARGETS_ALLOWED_WIT
$(error When running targets for this project other than `$(TARGETS_ALLOWED_WITH_NO_RELEASE_BRANCH)` a `RELEASE_BRANCH` is required)
else ifneq ($(IS_RELEASE_BRANCH_BUILD),)
# project has release branches and one was not specified, trigger target for all
BUILD_TARGETS=build/release-branches/all
RELEASE_TARGETS=release/release-branches/all
# if BUILD_TARGETS or RELEASE_TARGETS are set via an env and we change them here
# it will change the env var for the sub shell/make calls which is not what we want
BUILD_TARGETS_OVERRIDE=build/release-branches/all
RELEASE_TARGETS_OVERRIDE=release/release-branches/all

# avoid warnings when trying to read GIT_TAG file which wont exist when no release_branch is given
GIT_TAG=non-existent
Expand Down Expand Up @@ -530,6 +534,8 @@ endef
#################### TARGETS FOR OVERRIDING ########
BUILD_TARGETS?=github-rate-limit-pre validate-checksums attribution $(if $(IMAGE_NAMES),local-images,) $(if $(filter true,$(HAS_HELM_CHART)),helm/build,) $(if $(filter true,$(HAS_S3_ARTIFACTS)),upload-artifacts,) attribution-pr github-rate-limit-post
RELEASE_TARGETS?=validate-checksums $(if $(IMAGE_NAMES),images,) $(if $(filter true,$(HAS_HELM_CHART)),helm/push,) $(if $(filter true,$(HAS_S3_ARTIFACTS)),upload-artifacts,)
BUILD_TARGETS_OVERRIDE?=
RELEASE_TARGETS_OVERRIDE?=
####################################################

# convert commonly used, usually shell call, variables to lazily resolved cached variables
Expand Down Expand Up @@ -627,7 +633,7 @@ $(HELM_GIT_PATCH_TARGET): $(HELM_GIT_CHECKOUT_TARGET)
@echo -e $(call TARGET_START_LOG)
git -C $(HELM_SOURCE_REPOSITORY) config user.email [email protected]
git -C $(HELM_SOURCE_REPOSITORY) config user.name "Prow Bot"
git -C $(HELM_SOURCE_REPOSITORY) am --committer-date-is-author-date $(wildcard $(PROJECT_ROOT)/helm/patches)/*
if [ -n "$(HELM_PATCHES_DIR)" ]; then git -C $(HELM_SOURCE_REPOSITORY) am --committer-date-is-author-date $(HELM_PATCHES_DIR)/*; fi
@touch $@
@echo -e $(call TARGET_END_LOG)

Expand Down Expand Up @@ -664,7 +670,10 @@ endif
clone-repo: $(REPO)

.PHONY: checkout-repo
checkout-repo: $(if $(PATCHES_DIR),$(GIT_PATCH_TARGET),$(GIT_CHECKOUT_TARGET))
checkout-repo: $(if $(filter true,$(REPO_NO_CLONE)),,$(if $(PATCHES_DIR),$(GIT_PATCH_TARGET),$(GIT_CHECKOUT_TARGET)))

.PHONY: checkout-helm-repo
checkout-helm-repo: $(if $(filter true,$(REPO_NO_CLONE)),,$(if $(HELM_PATCHES_DIR),$(HELM_GIT_PATCH_TARGET),$(HELM_GIT_CHECKOUT_TARGET)))

.PHONY: patch-repo
patch-repo: checkout-repo
Expand Down Expand Up @@ -828,6 +837,11 @@ clean-job-caches: $(and $(findstring presubmit,$(JOB_TYPE)),$(filter true,$(PRUN
%-useradd/images/export: | $$(ENSURE_PREREQ) $$(ENABLE_LOGGING)
@mkdir -p $(IMAGE_OUTPUT_DIR) && $(BUILDCTL)

PHONY: combine-images
combine-images: IMAGE_BUILD_ARGS=IMAGE
combine-images: DOCKERFILE_FOLDER=$(BUILD_LIB)/docker/linux/combine
combine-images: images

## Helm Targets
.PHONY: helm/pull
helm/pull: | $$(ENABLE_LOGGING)
Expand All @@ -836,7 +850,7 @@ helm/pull: | $$(ENABLE_LOGGING)
.PHONY: %/helm/copy %/helm/require %/helm/replace %/helm/build %/helm/push
%/helm/copy %/helm/require %/helm/replace %/helm/build %/helm/push: HELM_CHART_NAME=$*

$(call FULL_CHART_TARGETS,copy) : %/helm/copy: $(LICENSES_TARGETS_FOR_PREREQ) $(if $(filter true,$(REPO_NO_CLONE)),,$(HELM_GIT_CHECKOUT_TARGET)) $(if $(wildcard $(PROJECT_ROOT)/helm/patches),$(HELM_GIT_PATCH_TARGET),) | ensure-helm ensure-skopeo $$(ENABLE_LOGGING)
$(call FULL_CHART_TARGETS,copy) : %/helm/copy: checkout-repo checkout-helm-repo $(LICENSES_TARGETS_FOR_PREREQ) | ensure-helm ensure-skopeo $$(ENABLE_LOGGING)
@$(BUILD_LIB)/helm_copy.sh $(HELM_SOURCE_REPOSITORY) $(HELM_DESTINATION_REPOSITORY) $(HELM_DIRECTORY) $(OUTPUT_DIR)

$(call FULL_CHART_TARGETS,require) : %/helm/require: %/helm/copy | $$(ENABLE_LOGGING)
Expand All @@ -857,7 +871,7 @@ helm/build: $(foreach chart,$(HELM_CHART_NAMES),$(chart)/helm/build)

# Build helm chart and push to registry defined in IMAGE_REPO.
.PHONY: helm/push
helm/push: $(foreach chart,$(HELM_CHART_NAMES),$(chart)/helm/push)
helm/push: $(if $(filter true,$(HAS_HELM_CHART)),$(foreach chart,$(HELM_CHART_NAMES),$(chart)/helm/push),)

#@ Fetch Binary Targets
.PHONY: handle-dependencies
Expand All @@ -869,10 +883,10 @@ $(BINARY_DEPS_DIR)/linux-%: | $$(ENABLE_LOGGING)

## Build Targets
.PHONY: build
build: $(BUILD_TARGETS)
build: $(or $(BUILD_TARGETS_OVERRIDE),$(BUILD_TARGETS))

.PHONY: release
release: $(RELEASE_TARGETS)
release: $(or $(RELEASE_TARGETS_OVERRIDE),$(RELEASE_TARGETS))

# Iterate over release branch versions, avoiding branches explicitly marked as skipped
.PHONY: %/release-branches/all
Expand Down
1 change: 1 addition & 0 deletions EKS_DISTRO_MINIMAL_BASE_NSENTER_TAG_FILE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023-10-20-1697820183.2
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ generate-project-list: | ensure-locale

.PHONY: generate-staging-buildspec
generate-staging-buildspec: export BINARY_PLATFORMS=linux/amd64 linux/arm64
generate-staging-buildspec: export IMAGE_PLATFORMS=linux/amd64 linux/arm64
generate-staging-buildspec: | ensure-locale
build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "$(ALL_PROJECTS)" "$(BASE_DIRECTORY)/release/staging-build.yml" "$(BASE_DIRECTORY)/buildspec.yml"
build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "$(ALL_PROJECTS)" "$(BASE_DIRECTORY)/release/checksums-build.yml" "$(BASE_DIRECTORY)/buildspecs/checksums-buildspec.yml" true EXCLUDE_FROM_CHECKSUMS_BUILDSPEC CHECKSUMS_BUILDSPECS false buildspecs/checksums-pr-buildspec.yml
Expand All @@ -199,7 +200,9 @@ generate-staging-buildspec: | ensure-locale
build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "containerd_containerd" "$(BASE_DIRECTORY)/projects/containerd/containerd/buildspecs/batch-build.yml" "$(BASE_DIRECTORY)/buildspec.yml" true
build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "opencontainers_runc" "$(BASE_DIRECTORY)/projects/opencontainers/runc/buildspecs/batch-build.yml" "$(BASE_DIRECTORY)/buildspec.yml" true
build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "torvalds_linux" "$(BASE_DIRECTORY)/projects/torvalds/linux/buildspecs/batch-build.yml" "$(BASE_DIRECTORY)/buildspec.yml" true
build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "aws_upgrader" "$(BASE_DIRECTORY)/projects/aws/upgrader/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"
build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "goharbor_harbor" "$(BASE_DIRECTORY)/projects/goharbor/harbor/buildspecs/batch-build.yml" "$(BASE_DIRECTORY)/buildspec.yml" true "DO_NOT_EXCLUDE_FROM_BUILDSPEC"
build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "aws_upgrader" "$(BASE_DIRECTORY)/projects/aws/upgrader/buildspecs/batch-build.yml" "$(BASE_DIRECTORY)/buildspec.yml" true "DO_NOT_EXCLUDE_FROM_BUILDSPEC"

.PHONY: generate
generate: generate-project-list generate-staging-buildspec
Expand Down
22 changes: 16 additions & 6 deletions build/lib/generate_staging_buildspec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ for project in "${PROJECTS[@]}"; do
PROJECT_DEPENDENCIES=$(make_var $PROJECT_PATH PROJECT_DEPENDENCIES)
fi

if [ -n "$PROJECT_DEPENDENCIES" ] && [ "$SKIP_DEPEND_ON" != "true" ]; then
if [ -n "$PROJECT_DEPENDENCIES" ] && [[ "${buildspec}" = "buildspecs/combine-images.yml" || "$SKIP_DEPEND_ON" != "true" ]]; then
DEPS=(${PROJECT_DEPENDENCIES// / })
for dep in "${DEPS[@]}"; do
if [ "$HARDCODED_DEP" = "true" ]; then
Expand Down Expand Up @@ -160,7 +160,7 @@ for project in "${PROJECTS[@]}"; do

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

if [[ "$BUILDSPECS_VAR" == "CHECKSUMS_BUILDSPECS" ]] && [[ "$BUILDSPEC_VARS_KEYS" == "RELEASE_BRANCH" ]] && [[ "false" == "$(make_var $PROJECT_PATH BINARIES_ARE_RELEASE_BRANCHED)" ]]; then
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=""
fi

Expand All @@ -184,18 +184,28 @@ for project in "${PROJECTS[@]}"; do

# If building on one binary platform assume we want to run on a specific arch instance
ARCH_TYPE="\"type\":\"$BUILDSPEC_PLATFORM\",\"compute-type\":\"$BUILDSPEC_COMPUTE_TYPE\","
if [ "${KEYS[0]}" = "BINARY_PLATFORMS" ]; then
if [ "${KEYS[0]}" = "BINARY_PLATFORMS" ] || [ "${KEYS[0]}" = "IMAGE_PLATFORMS" ]; then
if [ "${val1}" = "linux/amd64" ]; then
ARCH_TYPE="\"type\":\"LINUX_CONTAINER\",\"compute-type\":\"BUILD_GENERAL1_SMALL\","
ARCH_TYPE="\"type\":\"LINUX_CONTAINER\",\"compute-type\":\"$BUILDSPEC_COMPUTE_TYPE\","
else
ARCH_TYPE="\"type\":\"ARM_CONTAINER\",\"compute-type\":\"BUILD_GENERAL1_SMALL\","
ARCH_TYPE="\"type\":\"ARM_CONTAINER\",\"compute-type\":\"$BUILDSPEC_COMPUTE_TYPE\","
fi
fi

EXTRA_VARS=""
if [ "${KEYS[0]}" = "IMAGE_PLATFORMS" ]; then
EXTRA_VARS+=",\"BINARY_PLATFORMS\":\"${val1}\",\"IMAGE_TAG_SUFFIX\":\"-${val1#linux/}\""
HAS_HELM_CHART=$(make_var $PROJECT_PATH HAS_HELM_CHART)
if [ "${HAS_HELM_CHART}" = "true" ]; then
EXTRA_VARS+=",\"HAS_HELM_CHART\":\"false\""
fi
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\"}}}]" \
".batch.build-graph += [{\"identifier\":\"$IDENTIFIER\",$buildspec_field$DEPEND_ON\"env\":{$ARCH_TYPE\"variables\":{\"PROJECT_PATH\": \"projects/$org/$repo\"$CLONE_URL,\"${KEYS[0]}\":\"$val1\"$EXTRA_VARS}}}]" \
$STAGING_BUILDSPEC_FILE

done
else
VALUES_1=$(make_var $PROJECT_PATH ${VARS[0]})
Expand Down
17 changes: 17 additions & 0 deletions buildspecs/combine-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 0.2

env:
variables:
RELEASE_TARGETS: "combine-images helm/push"
BINARY_TARGETS: ""
LICENSES_TARGETS_FOR_PREREQ: ""
HANDLE_DEPENDENCIES_TARGET: ""

phases:
pre_build:
commands:
- ./build/lib/setup.sh

build:
commands:
- if $(make check-project-path-exists); then make release -C $PROJECT_PATH; fi
18 changes: 14 additions & 4 deletions projects/aws/upgrader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,26 @@ GIT_TAG=v$(RELEASE_BRANCH)-$(shell yq e ".releases[] | select(.branch==\"${RELEA

HAS_RELEASE_BRANCHES=true

BUILDSPEC_VARS_KEYS=RELEASE_BRANCH
BUILDSPEC_VARS_VALUES=SUPPORTED_K8S_VERSIONS
BUILDSPEC_DEPENDS_ON_OVERRIDE=containerd_containerd_linux_amd64 containerd_containerd_linux_arm64 kubernetes_sigs_cri_tools
EXCLUDE_FROM_CHECKSUMS_BUILDSPEC=true
# for the staging buildspec generation
BUILDSPEC_DEPENDS_ON_OVERRIDE=containerd_containerd_linux_amd64 containerd_containerd_linux_arm64 kubernetes_sigs_cri_tools

BUILDSPECS=buildspec.yml buildspecs/combine-images.yml
BUILDSPEC_1_COMPUTE_TYPE=BUILD_GENERAL1_LARGE
BUILDSPEC_1_VARS_KEYS=IMAGE_PLATFORMS
BUILDSPEC_1_VARS_VALUES=IMAGE_PLATFORMS
BUILDSPEC_1_ARCH_TYPES=LINUX_CONTAINER ARM_CONTAINER
BUILDSPEC_2_DEPENDS_ON_OVERRIDE=aws_upgrader_linux_amd64 aws_upgrader_linux_arm64

REPO_NO_CLONE=true
HAS_LICENSES=false

BASE_IMAGE_NAME=eks-distro-minimal-base-glibc
BASE_IMAGE_NAME=eks-distro-minimal-base-nsenter
IMAGE_NAMES=upgrader
# its not clear why, but if we do not set this here, even though this is the default
# when we try and override it in the combine-images target the override will not take
DOCKERFILE_FOLDER=./docker/linux
IMAGE_BUILD_ARGS=

PROJECT_DEPENDENCIES=eksd/kubernetes/client eksd/kubernetes/server eksd/cni-plugins eksa/containerd/containerd eksa/kubernetes-sigs/cri-tools

Expand Down
38 changes: 16 additions & 22 deletions projects/aws/upgrader/buildspecs/batch-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,30 @@
batch:
fast-fail: true
build-graph:
- identifier: aws_upgrader_1_24
- identifier: aws_upgrader_linux_amd64
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_SMALL
variables:
RELEASE_BRANCH: 1-24
- identifier: aws_upgrader_1_25
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_SMALL
type: LINUX_CONTAINER
compute-type: BUILD_GENERAL1_LARGE
variables:
RELEASE_BRANCH: 1-25
- identifier: aws_upgrader_1_26
IMAGE_PLATFORMS: linux/amd64
BINARY_PLATFORMS: linux/amd64
IMAGE_TAG_SUFFIX: -amd64
- identifier: aws_upgrader_linux_arm64
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_SMALL
variables:
RELEASE_BRANCH: 1-26
- identifier: aws_upgrader_1_27
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_SMALL
compute-type: BUILD_GENERAL1_LARGE
variables:
RELEASE_BRANCH: 1-27
- identifier: aws_upgrader_1_28
IMAGE_PLATFORMS: linux/arm64
BINARY_PLATFORMS: linux/arm64
IMAGE_TAG_SUFFIX: -arm64
- identifier: aws_upgrader
buildspec: buildspecs/combine-images.yml
depend-on:
- aws_upgrader_linux_amd64
- aws_upgrader_linux_arm64
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_SMALL
variables:
RELEASE_BRANCH: 1-28
version: 0.2
phases:
pre_build:
Expand Down
3 changes: 1 addition & 2 deletions projects/aws/upgrader/docker/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ ARG BUILDER_IMAGE
FROM $BUILDER_IMAGE as builder

RUN set -x && \
install_binary /usr/bin/nsenter \
/usr/bin/cp && \
install_binary /usr/bin/cp && \
cleanup "deps"

FROM $BASE_IMAGE
Expand Down
13 changes: 8 additions & 5 deletions projects/emissary-ingress/emissary/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ REPO=emissary
REPO_OWNER=emissary-ingress

EXCLUDE_FROM_STAGING_BUILDSPEC=true

BUILDSPECS=buildspec.yml buildspecs/combine-images.yml
BUILDSPEC_1_COMPUTE_TYPE=BUILD_GENERAL1_LARGE
BUILDSPEC_1_VARS_KEYS=IMAGE_PLATFORMS
BUILDSPEC_1_VARS_VALUES=IMAGE_PLATFORMS
BUILDSPEC_1_ARCH_TYPES=LINUX_CONTAINER ARM_CONTAINER
BUILDSPEC_2_DEPENDS_ON_OVERRIDE=emissary_ingress_emissary_linux_amd64 emissary_ingress_emissary_linux_arm64

SKIP_ON_RELEASE_BRANCH=true

BINARY_TARGET_FILES=busyambassador capabilities_wrapper example-envoy-metrics-sink k8sregistryctl kat-client kat-server
Expand All @@ -33,7 +41,6 @@ AMBASSADOR_VERSION_TARGET=$(REPO)/python/ambassador.version
include $(BASE_DIRECTORY)/Common.mk


combine/images/push: IMAGE_BUILD_ARGS=IMAGE
emissary-ingress/emissary/helm/%: PACKAGE_DEPENDENCIES=emissary-crds

emissary/crds/helm/%: HELM_DIRECTORY=charts/crds
Expand All @@ -56,10 +63,6 @@ $(AMBASSADOR_VERSION_TARGET): export GOPATH=/var
$(AMBASSADOR_VERSION_TARGET): | $$(ENABLE_DOCKER)
@$(MAKE) -C $(REPO) python/ambassador.version

PHONY: combine-images
combine-images: IMAGE_BUILD_ARGS=IMAGE
combine-images: DOCKERFILE_FOLDER=./docker/linux/combine
combine-images: images

########### DO NOT EDIT #############################
# To update call: make add-generated-help-block
Expand Down
39 changes: 21 additions & 18 deletions projects/emissary-ingress/emissary/buildspecs/batch-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,42 @@
# 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: emissary_ingress_emissary_amd64
buildspec: buildspec.yml
- identifier: emissary_ingress_emissary_linux_amd64
env:
type: LINUX_CONTAINER
compute-type: BUILD_GENERAL1_LARGE
variables:
IMAGE_TAG_SUFFIX: "-amd64"
IMAGE_PLATFORMS: linux/amd64
HAS_HELM_CHART: ""
- identifier: emissary_ingress_emissary_arm64
buildspec: buildspec.yml
IMAGE_PLATFORMS: linux/amd64
BINARY_PLATFORMS: linux/amd64
IMAGE_TAG_SUFFIX: -amd64
HAS_HELM_CHART: "false"
- identifier: emissary_ingress_emissary_linux_arm64
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_LARGE
variables:
IMAGE_TAG_SUFFIX: "-arm64"
IMAGE_PLATFORMS: linux/arm64
BINARY_PLATFORMS: linux/arm64
HAS_S3_ARTIFACTS: ""
HAS_HELM_CHART: ""
IMAGE_TAG_SUFFIX: -arm64
HAS_HELM_CHART: "false"
- identifier: emissary_ingress_emissary
buildspec: buildspecs/images.yml
buildspec: buildspecs/combine-images.yml
depend-on:
- emissary_ingress_emissary_amd64
- emissary_ingress_emissary_arm64
- emissary_ingress_emissary_linux_amd64
- emissary_ingress_emissary_linux_arm64
env:
type: ARM_CONTAINER
compute-type: BUILD_GENERAL1_SMALL
variables:
RELEASE_TARGETS: "combine-images helm/push"
BINARY_TARGETS: ""
LICENSES_TARGETS_FOR_PREREQ: ""
HANDLE_DEPENDENCIES_TARGET: ""
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
Loading