Skip to content

Aio image push#470

Merged
cooktheryan merged 5 commits intoopenshift:mainfrom
copejon:aio-image-push
Nov 29, 2021
Merged

Aio image push#470
cooktheryan merged 5 commits intoopenshift:mainfrom
copejon:aio-image-push

Conversation

@copejon
Copy link
Contributor

@copejon copejon commented Nov 19, 2021

Which issue(s) this PR addresses:

Closes #469

This PR adds a process for building, tagging, and releasing multi-arch AIO container images to quay.io/microshift/microshift-aio.

@openshift-ci openshift-ci bot requested review from husky-parul and oglok November 19, 2021 22:22
Comment on lines -161 to +193
podman manifest create "$IMAGE_REPO:$VERSION" >&2
for ref in "${RELEASE_IMAGE_TAGS[@]}"; do
podman manifest add "$IMAGE_REPO:$VERSION" "docker://$ref"
local dest_repo="$1"
local image_tags="$2"
podman manifest create "$dest_repo:$VERSION" >&2
for ref in "${image_tags[*]}"; do
podman manifest add "$dest_repo:$VERSION" "docker://$ref"
done
podman manifest push "$IMAGE_REPO:$VERSION" "$IMAGE_REPO:$VERSION"
podman manifest push "$IMAGE_REPO:$VERSION" "$IMAGE_REPO:latest"
podman manifest push "$dest_repo:$VERSION" "$dest_repo:$VERSION"
podman manifest push "$dest_repo:$VERSION" "$dest_repo:latest"
}

docker_create_manifest(){
local amend_images_options
for image in "${RELEASE_IMAGE_TAGS[@]}"; do
amend_images_options+="--amend $image"
done
local dest_repo="$1"
local image_tags="$2"
# use docker cli directly for clarity, as this is a docker-only func
docker manifest create "$IMAGE_REPO:$VERSION" "${RELEASE_IMAGE_TAGS[@]}" >&2
docker tag "$IMAGE_REPO:$VERSION" "$IMAGE_REPO:latest"
docker manifest push "$IMAGE_REPO:$VERSION"
docker manifest push "$IMAGE_REPO:latest"
docker manifest create "$dest_repo:$VERSION" "${image_tags[*]}" >&2
docker tag "$dest_repo:$VERSION" "$dest_repo:latest"
docker manifest push "$dest_repo:$VERSION"
docker manifest push "$dest_repo:latest"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These functions are made generic to support standalone and AIO build processes.

Comment on lines +268 to +281
# publish containerized microshift
build_container_images_artifacts || exit 1
STAGE_DIR=$(stage_release_image_binaries) || exit 1
push_container_image_artifacts || exit 1
push_container_manifest "$IMAGE_REPO" "${RELEASE_IMAGE_TAGS[@]}" || exit 1

# publish binaries
UPLOAD_URL="$(git_create_release "$API_DATA" "$TOKEN")" || exit 1
git_post_artifacts "$STAGE_DIR" "$UPLOAD_URL" "$TOKEN" || exit 1

# publish aio container
build_aio_container_images_artifacts || exit 1
push_aio_container_image_artifacts || exit 1
push_container_manifest "$AIO_IMAGE_REPO" "${AIO_RELEASE_IMAGE_TAGS[@]}" || exit 1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only changes here are to space out the existing steps into logical groupings, without mutating the order, and to add the AIO steps last. Added parameter passing to functions that were made generic above.

@mangelajo
Copy link
Contributor

you had a tiny conflict, it's resolved now. I only wonder how long will it take to create both images, the problem is that we build the arm64 image compiling microshift under qemu-static-arm64, it'd be far more efficient to just build the microshift-arm64 binary, and then have a dockerfile that copied it inside (similar to packaging/images/components)

@mangelajo
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 25, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 25, 2021

@copejon: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-openshift-conformance-sig-node 0a93376 link false /test e2e-openshift-conformance-sig-node
ci/prow/e2e-openshift-conformance-sig-storage 0a93376 link false /test e2e-openshift-conformance-sig-storage

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@cooktheryan
Copy link
Contributor

/LGTM

merging

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 29, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cooktheryan, mangelajo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AIO images are not versioned with containerized releases

3 participants