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

fix: support skipping tags #1787

Merged
merged 7 commits into from
May 25, 2024
Merged

Conversation

nodece
Copy link
Contributor

@nodece nodece commented May 17, 2024

Motivation

I'm using the buildx to build the multiple-arch images, when I use -Ddocker.skip.tag=true to skip the tag, this plugin still tags the image.

Changes

  • Add skip tag to the image level by <skipTag>
  • When the skip tag is true, the plugin will not tag the image on the build and buildx stage

Doc

The previous document included <skipTag>, so I did not add the document.

@nodece nodece force-pushed the buildx-skip-tag branch 2 times, most recently from a3dc832 to 7dcc06f Compare May 19, 2024 15:59
@nodece nodece requested a review from rohanKanojia May 19, 2024 16:04
@nodece
Copy link
Contributor Author

nodece commented May 19, 2024

@rohanKanojia Thank you for your review, this PR has been updated, could you review this PR again?

@nodece
Copy link
Contributor Author

nodece commented May 19, 2024

MacOS ci failed, what do you suggest, it seems to be unable to pull pg image.

@rohanKanojia
Copy link
Member

@nodece : Could you please address Sonar Code smells that seem applicable?

@nodece
Copy link
Contributor Author

nodece commented May 20, 2024

@rohanKanojia Done.

@nodece
Copy link
Contributor Author

nodece commented May 20, 2024

should I upgrade the postgres image? It looks blocked my PR.

@rohanKanojia
Copy link
Member

@nodece : Could you please rebase this one?

@Test
void buildWithSkipTag() throws IOException, MojoExecutionException {
buildWithTag(true);
}
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to somehow use @Nested annotation to group normal build and buildX tests? Initially, I was a bit confused by the test names. Can we use JUnit5 parameterized tests here to reduce duplication?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link

sonarcloud bot commented May 22, 2024

@rohanKanojia
Copy link
Member

@nodece : Thanks, looks good to be merged. Only thing I see missing is documentation. Could you please add documentation for this new field skipTags in plugin and image build configuration?

Could you also add an entry for this change in doc/changelog.md?

@nodece
Copy link
Contributor Author

nodece commented May 24, 2024

@nodece : Thanks, looks good to be merged. Only thing I see missing is documentation. Could you please add documentation for this new field skipTags in plugin and image build configuration?

Please see the PR description, I can also add the more description about when tag the image.

Could you also add an entry for this change in doc/changelog.md?

I can add skipTag parameter description to the changlong.

@rohanKanojia
Copy link
Member

You're right. Documentation is already there for plugin configuration skipTag but I think we need to add it for image level skipTag.

@nodece
Copy link
Contributor Author

nodece commented May 24, 2024

You're right. Documentation is already there for plugin configuration skipTag but I think we need to add it for image level skipTag.

The skipTag parameter exists in the plugin configuration and image levels(docker:build), could you check this documentation?

Please see https://dmp.fabric8.io/#build-configuration

@rohanKanojia
Copy link
Member

@nodece : oh, that's quite strange. I see that this field got added in this PR.

@rohanKanojia
Copy link
Member

The documentation was wrongly added in #954

@rohanKanojia rohanKanojia merged commit 150970d into fabric8io:master May 25, 2024
18 checks passed
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 this pull request may close these issues.

None yet

2 participants