tektoncd / plumbing

This repo holds configuration for infrastructure used across the tektoncd org 🏗️
Apache License 2.0
60 stars 110 forks source link

Migrate Tekton multi-arch image build to ghcr.io #2223

Open afrittoli opened 2 months ago

afrittoli commented 2 months ago

Feature request

Migrate the multi-arch-template pipeline to publish to ghcr.io. This includes updates to any of the cronjobs that use this template to build images.

Note: To be implemented as a separate PR: update references in the plumbing repo from gcr.io to ghcr.io once the new images are produced.

The pipeline project release pipeline has been migrated and can provide some insight.

Some key information for the migration:

Use case

Reduce Cloud Storage / Container Registry Spending: https://github.com/tektoncd/plumbing/issues/2157

Additional Info

The template part needs to be updated so that it may work with ghcr.io. The current version works with gcr.io, and unfortunately, it's not enough to change the target registry as authentication works a bit different (for gcr.io we used a service account file, and for ghcr.io we use a PAT), and ghcr.io requires OCI labels to be set

There are three types of builds we do today, which correspond to three separate templates.

This issue covers updating the template and cronjob for multi-architecture, with docker

The order of implementation should be:

LiteBrick204 commented 2 months ago

I would like to work on this.

afrittoli commented 2 months ago

@LiteBrick204 that's great, thank you - I assigned you to the issue. Please let me know if you have any question about the contribution process and/or the issue specifically.

LiteBrick204 commented 2 months ago

@afrittoli I have done it for the other PRs as well. Need to update the template files alone.

afrittoli commented 1 month ago

Migrate the single-arch-template pipeline to publish to ghcr.io. This includes updates to any of the cronjobs that use this template to build images.

Thank you for the PR! Let me provide you with some more details about this:

The template part needs to be updated so that it may work with ghcr.io. The current version works with gcr.io, and unfortunately, it's not enough to change the target registry as authentication works a bit different (for gcr.io we used a service account file, and for ghcr.io we use a PAT), and ghcr.io requires OCI labels to be set

I think the order of implementation should be:

One more note on this. There are three types of builds we do today, which correspond to three separate templates:

LiteBrick204 commented 1 month ago

For the EasyCLA, I am waiting for approval. The site is not going through with it.

LiteBrick204 commented 18 hours ago

The credentials are the same for multi-arch build same as #2221 https://github.com/tektoncd/plumbing/blob/main/tekton/resources/images/docker-multi-arch-template.yaml#L92-L93