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 the tags to the manifest.json #2043

Closed
DavyLandman opened this issue Oct 7, 2019 · 4 comments · Fixed by #2054
Closed

Add the tags to the manifest.json #2043

DavyLandman opened this issue Oct 7, 2019 · 4 comments · Fixed by #2054
Assignees
Milestone

Comments

@DavyLandman
Copy link

DavyLandman commented Oct 7, 2019

Environment:

  • Jib version: 1.6.0
  • Build tool: maven 3.6.0
  • OS: Windows 10

Description of the issue:
The <tags> feature (specify multiple tags for the image) does not work for buildTar, as the manifest.json only contains "repoTags": [ "image:latest"]. It would be very useful to push the tags to this metadata.

I think I could add it to the library, but first, is this desirable? To have all the tags in the tar? Currently it is done as an upload of the image and then tagging it multiple times (or uploading it multiple times with different tags for remote repositories). I think it does, so that the tar is self-contained.

Expected behavior:

When you define multiple tags, they end up in the tar, not as extra calls to the docker client/docker registry.

Steps to reproduce:

  1. on a random project mvn clean compile jib:buildTar -Djib.to.tags=extr
  2. open the jib-image.tar/manifest.json and see it only contains the ":latest" tag
@TadCordle
Copy link
Contributor

TadCordle commented Oct 10, 2019

Good idea, I think we can add this. If we add the additional tags to repoTags, this also lets us avoid the extra docker tag calls we currently do in LoadDockerStep. However I think the logic for building to the registry will need to stay the same, since I don't think that uses a tar.

I think I could add it to the library, but first, is this desirable?

Feel free to take a stab at it if you have the time! If not, it's no problem, I actually just ended up doing a lot of the necessary work to see if this issue made sense 😄 Edit: Since it wasn't a lot of extra work, I'm just going to put up a PR for it.

@TadCordle TadCordle added this to the v1.7.0 milestone Oct 10, 2019
@DavyLandman
Copy link
Author

thanks, looked at the PR, it was similar to how I solved it, I just got stuck without a grc account, so couldn't run the integration tests.

@TadCordle TadCordle self-assigned this Oct 14, 2019
@TadCordle
Copy link
Contributor

@DavyLandman 1.7.0 has been released with this fix!

@DavyLandman
Copy link
Author

DavyLandman commented Oct 19, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants