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

Pass explicit platforms list when publishing images #4480

Merged
merged 1 commit into from Jan 13, 2022
Merged

Pass explicit platforms list when publishing images #4480

merged 1 commit into from Jan 13, 2022

Conversation

ghost
Copy link

@ghost ghost commented Jan 13, 2022

Changes

Prior to this commit the pipeline-release Pipeline relied on default
params to ensure that the publish-release task emits a windows
entrypoint image. It looks like this no longer works because the
dogfooding cluster is using alpha API fields, including implicit params.

With implicit params it is not possible to skip a param in a PipelineTask if it
shares a name with a Param in the Pipeline. So before we were intentionally omitting the
platforms param and relying on the default param value in the
publish-release Task but with implicit params this is no longer
possible.

This commit overrides the param passed to publish-release with the full
string of platforms including windows. We don't want to update the
Pipeline's platforms param because our build-images
PipelineTask can't build the windows image. Confusing.

/kind bug

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

Release Notes

NONE

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. kind/bug Categorizes issue or PR as related to a bug. labels Jan 13, 2022
@tekton-robot tekton-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 13, 2022
Prior to this commit the pipeline-release Pipeline relied on default
params to ensure that the publish-release task emits a windows
entrypoint image. It looks like this no longer works because the
dogfooding cluster is using alpha API fields, including implicit params.

With implicit params it is not possible to _skip_ a param in a PipelineTask if it
shares a name with a Param in the Pipeline. So before we were intentionally omitting the
platforms param and relying on the default param value in the
publish-release Task but with implicit params this is no longer
possible.

This commit overrides the param passed to publish-release with the full
string of platforms including windows. We don't want to update the
Pipeline's `platforms` param because our build-images
PipelineTask can't build the windows image. Confusing.
@tekton-robot tekton-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 13, 2022
@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 13, 2022
@dibyom
Copy link
Member

dibyom commented Jan 13, 2022

We don't want to update the
Pipeline's platforms param because our build-images
PipelineTask can't build the windows image. Confusing.

yeah, maybe we can have explicit build-platforms and publish-platforms

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!
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 13, 2022
# pipeline. The reason for this is that the build-images
# PipelineTask doesn't build the windows base image, but the
# publish-release PipelineTask does.
value: linux/amd64,linux/arm,linux/arm64,linux/s390x,linux/ppc64le,windows/amd64
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we would benefit from value: $(params.platforms),windows/amd64

Copy link
Member

@imjasonh imjasonh left a comment

Choose a reason for hiding this comment

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

Thanks!

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dibyom, imjasonh

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:

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 56a9b03 into tektoncd:main Jan 13, 2022
@ghost ghost mentioned this pull request Jan 14, 2022
3 tasks
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/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants