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

Produce x86_64 & ARM64 fedora container images #381

Closed
wants to merge 1 commit into from
Closed
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
21 changes: 14 additions & 7 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,14 @@ container_images_task: &container_images
skip: *ci_docs_tooling
depends_on:
- image_builder
timeout_in: &cntr_timeout 40m
gce_instance: &ibi_vm
timeout_in: 120m # emulation is very slow
gce_instance:
image_project: "libpod-218412"
# Trust whatever was built most recently is functional
image_family: "image-builder"
zone: "us-central1-a"
disk: 200 # Must be 200, negatively affects performance otherwise.
type: "c2d-standard-4" # Extra muscle needed for multi-arch emulation
matrix:
- name: &name "Build ${TARGET_NAME} container"
env:
Expand All @@ -102,7 +103,9 @@ container_images_task: &container_images
# For $REGPFX namespace, select FQINs only.
REG_USERNAME: ENCRYPTED[df4efe530b9a6a731cfea19233e395a5206d24dfac25e84329de035393d191e94ead8c39b373a0391fa025cab15470f8]
REG_PASSWORD: ENCRYPTED[255ec05057707c20237a6c7d15b213422779c534f74fe019b8ca565f635dba0e11035a034e533a6f39e146e7435d87b5]
script: ci/make_container_images.sh;
script: |
podman run --rm --privileged mirror.gcr.io/multiarch/qemu-user-static:latest --reset -p yes
ci/make_container_images.sh
package_cache: &package_cache
folder: "/var/tmp/automation_images_tmp/.cache/**"
fingerprint_key: "${TARGET_NAME}-cache-version-1"
Expand All @@ -117,8 +120,13 @@ imgts_build_task:
skip: &ci_docs $CIRRUS_CHANGE_TITLE =~ '.*CI:DOCS.*'
depends_on:
- image_builder
timeout_in: *cntr_timeout
gce_instance: *ibi_vm
timeout_in: &cntr_timeout 40m
gce_instance: &ibi_vm
image_project: "libpod-218412"
# Trust whatever was built most recently is functional
image_family: "image-builder"
zone: "us-central1-a"
disk: 200 # Must be 200, negatively affects performance otherwise.
env: *image_env
script: |
export TARGET_NAME=imgts
Expand Down Expand Up @@ -159,7 +167,6 @@ base_images_task:
only_if: *is_pr
skip: *ci_docs_tooling
depends_on:
- container_images
- image_builder
# Packer needs time to clean up partially created VM images
auto_cancellation: $CI != "true"
Expand Down Expand Up @@ -294,7 +301,7 @@ test_debug_task:
skip: *ci_docs
depends_on:
- validate
gce_instance: *ibi_vm
gce_instance: *nested_virt_vm
matrix:
- env:
TARGET: ci_debug
Expand Down
2 changes: 1 addition & 1 deletion IMG_SFX
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20240819t164934z-f40f39d13
20240820t193001z-f40f39d13
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ GIT_HEAD = $(shell git rev-parse HEAD)
# Save some typing
_IMGTS_FQIN := quay.io/libpod/imgts:c$(_IMG_SFX)

# Necessary for embedding a ',' in an $(if ...) conditional
COMMA = ,

##### Targets #####

# N/B: The double-# after targets is gawk'd out as the target description
Expand Down Expand Up @@ -308,9 +311,16 @@ fedora_podman: ## Build Fedora podman development container
prior-fedora_podman: ## Build Prior-Fedora podman development container
$(call build_podman_container,$@,$(PRIOR_FEDORA_RELEASE))

# Build multi-arch manifest list for the fedora_podman target only (not prior-fedora_podman).
# N/B: This assumes that qemu_user_static is present and installed into the kernel or (as root)
# podman run --rm --privileged mirror.gcr.io/multiarch/qemu-user-static:latest --reset -p yes
# must been executed (e.g. on CentOS).
$(_TEMPDIR)/%_podman.iid: podman/Containerfile podman/setup.sh $(wildcard base_images/*.sh) $(_TEMPDIR) $(wildcard cache_images/*.sh)
podman build -t $*_podman:$(call err_if_empty,_IMG_SFX) \
podman build --manifest=$*_podman:$(call err_if_empty,_IMG_SFX) \
--security-opt label=disable \
--security-opt seccomp=unconfined \
--platform=linux/amd64$(if $(subst prior-fedora,,$*),$(COMMA)linux/arm64) \
--jobs=2 \
--iidfile=$@ \
--build-arg=BASE_NAME=$(subst prior-,,$*) \
--build-arg=BASE_TAG=$(call err_if_empty,BASE_TAG) \
Expand Down