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

CI TEST DO NOT MERGE Revert "Fixup FIPS Makefile/E2E" #2404

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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ sub-push: all-image-registry push-manifest

.PHONY: sub-push-fips
sub-push-fips:
$(MAKE) FIPS=true TAG=$(TAG)-fips sub-push
$(MAKE) FIPS=true sub-push

.PHONY: sub-push-a1compat
sub-push-a1compat:
Expand Down
2 changes: 1 addition & 1 deletion hack/e2e/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function build_and_push() {
export ALL_OS="linux"
export ALL_ARCH_linux="${IMAGE_ARCH}"
fi
make -j $(nproc) sub-push
make -j $(nproc) all-push

loudecho "Image pushed to ${IMAGE_NAME}:${IMAGE_TAG}"
}
Expand Down
21 changes: 13 additions & 8 deletions hack/e2e/test-images.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

# Copyright 2025 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the 'License');
Expand Down Expand Up @@ -34,10 +36,13 @@ function build_and_push() {
MAX_IMAGES=10000
IMAGE_COUNT=$(aws ecr list-images --repository-name "${IMAGE##*/}" --region "${REGION}" --query 'length(imageIds[])')

if [ $IMAGE_COUNT -ge $MAX_IMAGES ]; then
loudecho "Repository image limit reached. Unable to push new images."
exit 1
fi
loudecho "there are ${IMAGE_COUNT} images"


# if [ $IMAGE_COUNT -ge $MAX_IMAGES ]; then
# loudecho "Repository image limit reached. Unable to push new images."
# exit 1
# fi

loudecho "Building and pushing test driver images to ${IMAGE}:${IMAGE_TAG}"
aws ecr get-login-password --region "${REGION}" | docker login --username AWS --password-stdin "${AWS_ACCOUNT_ID}.dkr.ecr.${REGION}.amazonaws.com"
Expand All @@ -51,7 +56,7 @@ function build_and_push() {

loudecho "Images pushed to ${IMAGE_NAME}:${IMAGE_TAG}"
}

aws ecr delete-repository --repository-name aws-ebs-csi-driver --force --region "${AWS_REGION}"
REPO_CHECK=$(aws ecr describe-repositories --region "${AWS_REGION}")
if [ $(jq ".repositories | map(.repositoryName) | index(\"${IMAGE_NAME##*/}\")" <<<"${REPO_CHECK}") == "null" ]; then
aws ecr create-repository --region "${AWS_REGION}" --repository-name aws-ebs-csi-driver >/dev/null
Expand All @@ -68,18 +73,18 @@ imageSuffixes=("a1compat fips-windows-amd64-ltsc2022 fips-windows-amd64-ltsc2019
loudecho "Ensuring all images are present"

for suffix in ${imageSuffixes[@]}; do
if [ ! "$(crane digest "${IMAGE}":"${TAG}"-"${suffix}")" ]; then
if [ ! "$(docker manifest inspect "${IMAGE}":"${TAG}"-"${suffix}")" ]; then
loudecho "$suffix image not found"
exit 1
fi
done

loudecho "Ensuring image indexes have all images"
if [ ! "$(crane manifest ${IMAGE}:${TAG} | jq ".manifests.[3].platform")" ]; then
if [ ! "$(docker manifest inspect ${IMAGE}:${TAG} | jq ".manifests.[3].platform")" ]; then
loudecho "Error index image is missing images"
exit 1
fi
if [ ! "$(crane manifest ${IMAGE}:${TAG}-fips | jq ".manifests.[3].platform")" ]; then
if [ ! "$(docker manifest inspect ${IMAGE}:${TAG}-fips | jq ".manifests.[3].platform")" ]; then
loudecho "Error fips index image is missing images"
exit 1
fi
Expand Down