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

specify labels to be set on output images #50

Closed
gabemontero opened this issue Mar 4, 2020 · 8 comments · Fixed by #854
Closed

specify labels to be set on output images #50

gabemontero opened this issue Mar 4, 2020 · 8 comments · Fixed by #854
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.

Comments

@gabemontero
Copy link
Member

Today in openshift build v1 one can specify labels to set on the resulting output image.

Do we want to replicate such a capability in the build v2 API?

In theory such labels could be propagated as tekton parameters to the various steps in a task, where the steps that produce/push the image could leverage the options of the build tool being leveraged to set the label.

@gabemontero gabemontero added the buildv1 Items with this label somehow pertain to getting equivalent buildv1 function in buildv2 label Mar 9, 2020
@sbose78
Copy link
Member

sbose78 commented May 10, 2020

Yes, we should have this.

@zhangtbj
Copy link
Contributor

Hi all,

Do you mean set the specify labels on the resulting output ImageStream or the real output Docker image?

@gabemontero
Copy link
Member Author

Hi all,

Do you mean set the specify labels on the resulting output ImageStream or the real output Docker image?

On the image ... not the imagestream

@adambkaplan
Copy link
Member

adambkaplan commented Oct 22, 2020

/kind feature

This is perhaps something we add to the output image spec in the API. Controlling labels on images is an important feature in multiple DevOps contexts.

Each build strategy would probably need to implement this on their own terms, and accept the labels array/map as an argument.

@openshift-ci-robot openshift-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 22, 2020
@adambkaplan adambkaplan added this to the release-v1.0.0 milestone Oct 22, 2020
@adambkaplan adambkaplan removed the buildv1 Items with this label somehow pertain to getting equivalent buildv1 function in buildv2 label Oct 22, 2020
@otaviof
Copy link
Member

otaviof commented Oct 22, 2020

As a example use-case, we can consider new GitHub Container Registry it needs labels to link the image with the project/organization.

@qu1queee qu1queee added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Jan 15, 2021
@akram
Copy link
Contributor

akram commented Feb 1, 2021

Hi @gabemontero and @otaviof,

it looks like to be done here: https://github.com/shipwright-io/build/blob/master/pkg/controller/buildrun/runtime_image.go#L35-L37

isnt'it ?

@gabemontero
Copy link
Member Author

Hi @gabemontero and @otaviof,

it looks like to be done here: https://github.com/shipwright-io/build/blob/master/pkg/controller/buildrun/runtime_image.go#L35-L37

isnt'it ?

Yeah @akram that copies labels from the runtime / base / builder image to the output image.

But this feature request, which is one of the "port openshift build functionality to shipwright" types, is to also be able to specify labels on the build, independent of the runtime image used, and have those show up on the output image.

That said, I believe what you pointed out is a useful distinction, and if / when we do this particular feature, the associated doc should explicitly distinguish between the two.

thanks

@SaschaSchwarze0
Copy link
Member

Related EP: Add EP: Modifying Output Image #731

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants