diff --git a/Makefile b/Makefile index a94757bad5..002f407f65 100644 --- a/Makefile +++ b/Makefile @@ -89,6 +89,7 @@ generate-project-list: | ensure-locale build/lib/generate_projects_list.sh $(BASE_DIRECTORY) .PHONY: generate-staging-buildspec +generate-staging-buildspec: export BINARY_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" build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "$(ALL_PROJECTS)" "$(BASE_DIRECTORY)/release/checksums-build.yml" true EXCLUDE_FROM_CHECKSUMS_BUILDSPEC CHECKSUMS_BUILDSPECS false buildspecs/checksums-pr-buildspec.yml @@ -97,6 +98,7 @@ generate-staging-buildspec: | ensure-locale build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "kubernetes-sigs_kind" "$(BASE_DIRECTORY)/projects/kubernetes-sigs/kind/buildspecs/batch-build.yml" true build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "containerd_containerd" "$(BASE_DIRECTORY)/projects/containerd/containerd/buildspecs/batch-build.yml" true build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "opencontainers_runc" "$(BASE_DIRECTORY)/projects/opencontainers/runc/buildspecs/batch-build.yml" true + build/lib/generate_staging_buildspec.sh $(BASE_DIRECTORY) "torvalds_linux" "$(BASE_DIRECTORY)/projects/torvalds/linux/buildspecs/batch-build.yml" true .PHONY: generate generate: generate-project-list generate-staging-buildspec diff --git a/projects/torvalds/linux/Makefile b/projects/torvalds/linux/Makefile index 1b750fc4bd..f32bcbcc94 100644 --- a/projects/torvalds/linux/Makefile +++ b/projects/torvalds/linux/Makefile @@ -11,7 +11,7 @@ SIMPLE_CREATE_BINARIES=false # ensure we are building to a directory based on the current # host platform to avoid ever creating a different arch'd # binary in the wrong folder -BINARY_PLATFORMS=$(BUILDER_PLATFORM) +BINARY_PLATFORMS?=$(BUILDER_PLATFORM) BINARY_TARGETS=$(OUTPUT_BIN_DIR)/$(subst /,-,$(BINARY_PLATFORMS))/tools/bootconfig HAS_LICENSES=false @@ -25,8 +25,17 @@ IMAGE_NAMES= # this project never builds arm, dont fake it in presubmits FAKE_ARM_BINARIES_FOR_VALIDATION=false -# we cant cross build this so must build on an amd instance -BUILDSPEC_PLATFORM=LINUX_CONTAINER +EXCLUDE_FROM_CHECKSUMS_BUILDSPEC=true + +BUILDSPEC_VARS_KEYS=BINARY_PLATFORMS +BUILDSPEC_VARS_VALUES=BINARY_PLATFORMS +BUILDSPEC_ARCH_TYPES=LINUX_CONTAINER ARM_CONTAINER + +# Since we build the arm and amd binaries on difference instances in codebuild +# we do not want to delete missing files when s3 sync-ing from local to the bucket +# since this would clobber the other build's artifacts +UPLOAD_DO_NOT_DELETE=true + include $(BASE_DIRECTORY)/Common.mk diff --git a/projects/torvalds/linux/buildspecs/batch-build.yml b/projects/torvalds/linux/buildspecs/batch-build.yml new file mode 100644 index 0000000000..ea77723c41 --- /dev/null +++ b/projects/torvalds/linux/buildspecs/batch-build.yml @@ -0,0 +1,33 @@ +# 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: torvalds_linux_linux_amd64 + buildspec: buildspec.yml + env: + type: LINUX_CONTAINER + compute-type: BUILD_GENERAL1_SMALL + variables: + BINARY_PLATFORMS: linux/amd64 + - identifier: torvalds_linux_linux_arm64 + buildspec: buildspec.yml + env: + type: ARM_CONTAINER + compute-type: BUILD_GENERAL1_SMALL + variables: + BINARY_PLATFORMS: linux/arm64 diff --git a/release/checksums-build.yml b/release/checksums-build.yml index d23a61f7d3..3ce51e60ec 100644 --- a/release/checksums-build.yml +++ b/release/checksums-build.yml @@ -550,14 +550,6 @@ batch: compute-type: BUILD_GENERAL1_SMALL variables: PROJECT_PATH: projects/tinkerbell/tinkerbell-chart - - identifier: torvalds_linux - buildspec: buildspecs/checksums-buildspec.yml - env: - type: LINUX_CONTAINER - compute-type: BUILD_GENERAL1_SMALL - variables: - PROJECT_PATH: projects/torvalds/linux - CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/torvalds.linux - identifier: vmware_govmomi buildspec: buildspecs/checksums-buildspec.yml env: @@ -637,5 +629,4 @@ batch: - tinkerbell_rufio - tinkerbell_tink - tinkerbell_tinkerbell_chart - - torvalds_linux - vmware_govmomi diff --git a/release/staging-build.yml b/release/staging-build.yml index 08684c4aff..6532de7478 100644 --- a/release/staging-build.yml +++ b/release/staging-build.yml @@ -689,7 +689,7 @@ batch: compute-type: BUILD_GENERAL1_SMALL variables: PROJECT_PATH: projects/tinkerbell/tinkerbell-chart - - identifier: torvalds_linux + - identifier: torvalds_linux_linux_amd64 buildspec: buildspec.yml env: type: LINUX_CONTAINER @@ -697,6 +697,16 @@ batch: variables: PROJECT_PATH: projects/torvalds/linux CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/torvalds.linux + BINARY_PLATFORMS: linux/amd64 + - identifier: torvalds_linux_linux_arm64 + buildspec: buildspec.yml + env: + type: ARM_CONTAINER + compute-type: BUILD_GENERAL1_SMALL + variables: + PROJECT_PATH: projects/torvalds/linux + CLONE_URL: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/torvalds.linux + BINARY_PLATFORMS: linux/arm64 - identifier: vmware_govmomi buildspec: buildspec.yml env: