-
Notifications
You must be signed in to change notification settings - Fork 128
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
Adding multi-arch matrix pipeline #1236
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this
# add matrix to run based on build-platforms | ||
# change build-image-index to use results from build-containers as well as run after it | ||
# change build-image-index to build image index | ||
# change JAVA_COMMUNITY_DEPENDENCIES value to "$(tasks.build-containers.results.JAVA_COMMUNITY_DEPENDENCIES[0])" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we don't care from which image build the JAVA_COMMUNITY_DEPENDENCIES
resulted, all architectures will generate the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been the pattern that we have maintained when exploring multi-arch pipelines. It can be revisited when the java build pipeline is reassessed for multi-arch support.
value: build-containers | ||
- op: replace | ||
path: /spec/tasks/3/taskRef/name | ||
value: buildah-remote-oci-ta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We build everything remotely, pragmatic approach...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, we use the same task for everything. The intention behind some of the linked issues in the beginning is to allow these to be a "pass through" to an in-cluster build without changing the task used.
5878a49
to
3345b3b
Compare
3345b3b
to
6fb9c01
Compare
/retest build-definitions-pull-request |
e3a97f4
to
b86405f
Compare
Is this an implementation of STONEBLD-2567? |
@ifireball, yes. As is #1226. |
IIUC, this is semi-blocked until tektoncd/chains#1164 becomes generally available within Konflux. Is that accurate? |
See also #1226 which may have some overlap. |
@simonbaird, This is not blocked on the Chains bug fix. I have worked around that with #1204 |
Ack, so I think we're likely to abandon #1226, which (AIUI) tries to implement a multi-arch pipeline without matrix support. Do you agree @joejstuart ? |
b86405f
to
84e3df9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arewm: 1 invalid OWNERS file
In response to this:
This is a draft PR for a multi-arch pipeline with matrix builds. It cannot be merged yet as there are still a couple of outstanding issues with running a matrix build including:
- Multi-platform support for running workloads on the local cluster: feat(KFLUXINFRA-741): PROD: MPC w/ "local" support redhat-appstudio/infra-deployments#4328 chore(KFLUXINFRA-743) Prod local platforms redhat-appstudio/infra-deployments#4329
- Support in the buildah task for localhosts to be run in cluster instead of remotely: Enable remote tasks to be run in cluster #1216
- Automatically appending an architecture suffix to the image tags: Add an architecture suffix to images pushed for multi-platform if missing #1185
- Support for referencing single-element matrix results by array: SRVKP-5882
Before you complete this pull request ...
Look for any open pull requests in the repository with the title "e2e-tests update" and
see if there are recent e2e-tests updates that will be applicable to your change.
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-sigs/prow repository.
84e3df9
to
b7e6e9e
Compare
fdbe24f
to
de741da
Compare
59a8c06
to
089a8a1
Compare
/retest |
@@ -107,7 +107,7 @@ spec: | |||
results: | |||
- description: Digest of the image just built | |||
name: IMAGE_DIGEST | |||
- description: Image repository where the built image was pushed | |||
- description: Image repository and tag where the built image was pushed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "and tag" part is technically up to the user; if they use a tag-less image as IMAGE
, then IMAGE_URL
won't have a tag either.
But this should be rare if not non-existent in practice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If no tag is set than an implicit tag of latest
will be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used yes, but not returned in IMAGE_URL
if [[ $(echo $i | tr -cd ":" | wc -c) == 2 ]]; then | ||
TOADD_REPOSITORY="$(echo "$i" | cut -d@ -f1)" | ||
TOADD_DIGEST="$(echo "$i" | cut -d@ -f2)" | ||
TOADD_TAG="$(echo "$IMAGE" | cut -d: -f2)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we be extracting the tag from $i
rather than $IMAGE
? Do we want to ignore the actual tag in IMAGES
for some reason?
Note: this code wouldn't work as is, the tag extraction doesn't handle digests (and port numbers in the registry host, but that's a problem across almost every task in the pipeline)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this tag logic because the e2e tests were failing since no tag was getting set. After looking at the pipeline definitions again, this is because I was passing the IMAGE_REF
from the container build instead of IMAGE_URL
. The result of this is that the IMAGE_URL that was returned ended up stripping off the tag.
For a matrix build, we need to pass IMAGE_REF
, but for non-matrix builds, however, $(tasks.build-container.results.IMAGE_URL)@$(tasks.build-container.results.IMAGE_DIGEST)
should be used to define the input IMAGES
to allow the pass-through functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understood that, but it would be great if the task worked in general, not only for some possible configurations of a pipeline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this works, though the build-image-index code is a bit mind-bending in its handling of tags
089a8a1
to
eb17d6d
Compare
PR needs rebase. 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-sigs/prow repository. |
eb17d6d
to
17c8fff
Compare
* Use of Image Index * Inclusion of image tag in IMAGE_URL result Signed-off-by: arewm <[email protected]>
* Created a new task that has an appropriate name (build-image-index) * Changed the build-image-manifest task to be a rebuild of the new build-image-index task * Enabled the image index task to run and skip the generation of an index image. This lets the task be added into "single arch" pipelines as well as there are still situations where an image index should be created Signed-off-by: arewm <[email protected]>
The build-image-index task is added to all pipelines but the generation of an image index is disabled by default. Signed-off-by: arewm <[email protected]>
17c8fff
to
b8615a5
Compare
Signed-off-by: arewm <[email protected]>
b8615a5
to
462f97e
Compare
With konflux-ci/build-definitions#1236, we started building a multi-arch pipeline. This change adds it to the config map so that it can be used for configuring components. Signed-off-by: arewm <[email protected]>
With konflux-ci/build-definitions#1236, we started building a multi-arch pipeline. This change adds it to the config map so that it can be used for configuring components. Signed-off-by: arewm <[email protected]>
With konflux-ci/build-definitions#1236, we started building a multi-arch pipeline. This change adds it to the config map so that it can be used for configuring components. Signed-off-by: arewm <[email protected]>
With konflux-ci/build-definitions#1236, we started building a multi-arch pipeline. This change adds it to the config map so that it can be used for configuring components. Signed-off-by: arewm <[email protected]>
With konflux-ci/build-definitions#1236, we started building a multi-arch pipeline. This change adds it to the config map so that it can be used for configuring components. Signed-off-by: arewm <[email protected]>
With konflux-ci/build-definitions#1236, we started building a multi-arch pipeline. This change adds it to the config map so that it can be used for configuring components. Signed-off-by: arewm <[email protected]>
This is a draft PR for a multi-arch pipeline with matrix builds. It cannot be merged yet as there are still a couple of outstanding issues with running a matrix build including:
Before you complete this pull request ...
Look for any open pull requests in the repository with the title "e2e-tests update" and
see if there are recent e2e-tests updates that will be applicable to your change.