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

Allow configuring enablePlatformTags via plugins. #3710

Conversation

tylerscoville
Copy link

Continuation of #3518

I'm interested in being able to configure enablePlatformTags via the gradle plugin. I think this is the path to do that as described in #3523 (comment).

@mpeddada1
Copy link
Contributor

Thank you for following up on the contribution @tylerscoville! We will review this week.

Allow configuring enablePlatformTags via plugins. Creates a new config parameter jib.to.enablePlatformTags and passes it through to the build context.

comment formatting
@tylerscoville tylerscoville force-pushed the tscoville/enable_platform_tags_plugin branch from 4dc0a15 to daa5a4b Compare July 25, 2022 19:01
@tylerscoville
Copy link
Author

@mpeddada1 Thanks for having a look! I pushed some changes to try and up test coverage and clean up the commit history.

@sonarcloud
Copy link

sonarcloud bot commented Jul 29, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

77.3% 77.3% Coverage
0.0% 0.0% Duplication

* images are not tagged with platform tags.
* @return this
*/
public Containerizer setEnablePlatformTags(boolean enablePlatformTags) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we also add an integration test for platform tags in ContainerizerIntegrationTest? Something similar to:

public void testSteps_forBuildToDockerRegistry_multipleTags()

Copy link
Author

Choose a reason for hiding this comment

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

I spent a little bit of time on this and will probably need some help updating these tests. I'm not quite sure how to add another platform given the test setup?

@mpeddada1
Copy link
Contributor

@tylerscoville Thanks again! I've added a few comments. Let me know if you have any questions!

Copy link
Contributor

@elefeint elefeint left a comment

Choose a reason for hiding this comment

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

Minor validation question.

@tylerscoville
Copy link
Author

@mpeddada1 @elefeint Thank you for the review! Sorry it took me so long to get back to this.

Copy link
Contributor

@elefeint elefeint left a comment

Choose a reason for hiding this comment

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

Looks like adding the new method to RawConfiguration interface broke maven compilation --

Task :jib-maven-plugin:compileJava FAILED
/home/runner/work/jib/jib/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/MavenRawConfiguration.java:30: error: MavenRawConfiguration is not abstract and does not override abstract method getEnablePlatformTags() in RawConfiguration
public class MavenRawConfiguration implements RawConfiguration {

@ghost
Copy link

ghost commented Oct 31, 2022

@tylerscoville THANKS!

I went back and looked at attempting this twice. I kept getting lost in the configuration chain. And the job kept getting me distracted with work things.

I'm still trying to get some other dependencies updated so I can get to multi-arch. Do you need any help on this?

@tylerscoville tylerscoville requested review from elefeint and mpeddada1 and removed request for mpeddada1 and elefeint March 9, 2023 23:43
@tylerscoville
Copy link
Author

Looks like adding the new method to RawConfiguration interface broke maven compilation --

Task :jib-maven-plugin:compileJava FAILED
/home/runner/work/jib/jib/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/MavenRawConfiguration.java:30: error: MavenRawConfiguration is not abstract and does not override abstract method getEnablePlatformTags() in RawConfiguration
public class MavenRawConfiguration implements RawConfiguration {

I defaulted the RawConfiguration to return false. Hopefully this gets us past that error 🤞

@tylerscoville tylerscoville requested review from elefeint and removed request for mpeddada1 March 10, 2023 00:26
@tylerscoville
Copy link
Author

@elefeint @mpeddada1 Sorry about the long delay on this. Let me know if there is anything else I can do!

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.

4 participants