Skip to content

Allow configuring enablePlatformTags via plugins.#3710

Closed
tylerscoville wants to merge 4 commits intoGoogleContainerTools:masterfrom
tylerscoville:tscoville/enable_platform_tags_plugin
Closed

Allow configuring enablePlatformTags via plugins.#3710
tylerscoville wants to merge 4 commits intoGoogleContainerTools:masterfrom
tylerscoville:tscoville/enable_platform_tags_plugin

Conversation

@tylerscoville
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Author

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

@sonarqubecloud
Copy link
Copy Markdown

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

Comment thread jib-core/src/test/java/com/google/cloud/tools/jib/api/ContainerizerTest.java Outdated
* images are not tagged with platform tags.
* @return this
*/
public Containerizer setEnablePlatformTags(boolean enablePlatformTags) {
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

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

Copy link
Copy Markdown
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
Copy Markdown
Author

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

Copy link
Copy Markdown
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
Copy Markdown

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 elefeint and mpeddada1 March 9, 2023 23:43
@tylerscoville
Copy link
Copy Markdown
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
Copy Markdown
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