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

Add build of dogfooding images in multi-arch form #629

Merged
merged 1 commit into from
Nov 11, 2020

Conversation

barthy1
Copy link
Member

@barthy1 barthy1 commented Nov 6, 2020

Changes

Extend current cronjobs/triggers setup to build dogfooding images in multi-arch form when it's necessary:

  • create 2 TriggerTemplates and TriggerBindings for single-arch and multi-arch cases
  • extend eventlistener to decide which build to do (based on platforms parameter value)
  • add PLATFORMS parameter to cronjobs to be able to specify for which platforms multi-arch image should be
  • extend several image cronjobs to use multi-arch build (tkn, alpine-git-nonroot, skopeo)
  • for multi-arch build buildx in main container and dind sidecar are used
  • builds will be done on amd64 dogfooding cluster, not other native hardware is required.

Not every image can be built with this approach, so I suggest to use it only for images, which are required for the tests.
The build cronjobs were updated to those exact images.

/kind misc

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide
for more details.

@tekton-robot tekton-robot added the kind/misc Categorizes issue or PR as a miscellaneuous one. label Nov 6, 2020
@tekton-robot tekton-robot requested review from dlorenc and jerop November 6, 2020 09:28
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 6, 2020
@barthy1 barthy1 force-pushed the dogfooding_ma_images branch from 31636f8 to 2e94acd Compare November 6, 2020 10:59
@barthy1
Copy link
Member Author

barthy1 commented Nov 6, 2020

cc @afrittoli

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 9, 2020
Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

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

Thanks for this!
I have a few comments, but they're not really blocking, more like my personal opinions - it would be nice to change the image not to use the mario tag though, since that is only for testing and it may be overwritten.

@@ -0,0 +1,9 @@
nameReference:
- kind: TriggerBinding
Copy link
Member

Choose a reason for hiding this comment

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

NIT: There's no need to use kustomize on bindings, you can specify multiple bindings in a trigger, so for me the way to go would be to have the common base binding and another platform binding which is only used on the multi-arch trigger.

@barthy1 barthy1 force-pushed the dogfooding_ma_images branch 3 times, most recently from 8007a07 to cf14dc6 Compare November 10, 2020 12:48
Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

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

Thanks for all the updates!
One last thing and then it's ready to go.

tekton/resources/images/bindings.yaml Outdated Show resolved Hide resolved
tekton/resources/images/eventlistener.yaml Outdated Show resolved Hide resolved
Extend current cronjobs/triggers setup to build dogfooding images in
multi-arch form when it's necessary:
- use separate TriggerTemplates and TriggerBindings for
single-arch and multi-arch cases
- extend eventlistener to filter requests for single-arch and
multi-arch builds
- add PLATFORMS parameter to cronjobs to be able to specify for which
platforms multi-arch image should be
- extend several image cronjobs to use multi-arch build (`tkn`, `alpine-git-nonroot`, `skopeo`)

Signed-off-by: Yulia Gaponenko <[email protected]>
@barthy1 barthy1 force-pushed the dogfooding_ma_images branch from cf14dc6 to 0657180 Compare November 11, 2020 14:38
Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 11, 2020
@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afrittoli, vdemeester

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [afrittoli,vdemeester]

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

@tekton-robot tekton-robot merged commit ec2bc2c into tektoncd:master Nov 11, 2020
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. kind/misc Categorizes issue or PR as a miscellaneuous one. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants