Skip to content

Unify jibMaven and jibGradle blocks into jib with auto detection#2808

Merged
balopat merged 16 commits intoGoogleContainerTools:masterfrom
briandealwis:unified-jib
Sep 11, 2019
Merged

Unify jibMaven and jibGradle blocks into jib with auto detection#2808
balopat merged 16 commits intoGoogleContainerTools:masterfrom
briandealwis:unified-jib

Conversation

@briandealwis
Copy link
Copy Markdown
Member

Combines the JibMavenArtifact and JibGradleArtifact (and corresponding jibMaven: and jibGradle: blocks) into a single JibArtifact and jib: block. Jib now guesses the underlying Jib plugin type based on the file contents within the project.

JibArtifact actually has a Type field — a simple int — for explicitly specifying the plugin type, but it is not current exported as it's only been used for tests. We could make this field explicit later, but we'd need to teach the schema generator how to translate enums.

Fixes #1134

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 4, 2019

Codecov Report

Merging #2808 into master will decrease coverage by 0.02%.
The diff coverage is 71.65%.

Impacted Files Coverage Δ
pkg/skaffold/schema/latest/config.go 100% <ø> (ø) ⬆️
pkg/skaffold/build/local/local.go 33.33% <0%> (-3.59%) ⬇️
pkg/skaffold/build/gcb/types.go 14.7% <0%> (+1.54%) ⬆️
pkg/skaffold/runner/diagnose.go 13.43% <0%> (+0.38%) ⬆️
pkg/skaffold/util/util.go 86.48% <100%> (+0.57%) ⬆️
pkg/skaffold/jib/jib_maven.go 100% <100%> (ø) ⬆️
pkg/skaffold/initializer/init.go 59.14% <100%> (ø) ⬆️
pkg/skaffold/build/gcb/spec.go 100% <100%> (ø) ⬆️
pkg/skaffold/jib/jib_gradle.go 100% <100%> (ø) ⬆️
pkg/skaffold/build/local/jib_maven.go 100% <100%> (ø) ⬆️
... and 5 more

Copy link
Copy Markdown
Member

@chanseokoh chanseokoh left a comment

Choose a reason for hiding this comment

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

LGTM. The changes seem innocuous and relatively straightforward.

Copy link
Copy Markdown
Member

@loosebazooka loosebazooka left a comment

Choose a reason for hiding this comment

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

@briandealwis
Copy link
Copy Markdown
Member Author

@balopat balopat added the docs-modifications runs the docs preview service on the given PR label Sep 10, 2019
@container-tools-bot
Copy link
Copy Markdown

Please visit http://34.94.233.95:1313 to view changes to the docs.

@container-tools-bot container-tools-bot removed the docs-modifications runs the docs preview service on the given PR label Sep 10, 2019
@@ -190,13 +186,13 @@ each produce a separate container image.

#### Maven

Copy link
Copy Markdown
Contributor

@balopat balopat Sep 10, 2019

Choose a reason for hiding this comment

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

I would love to see the maven/gradle detection logic documented here for our users.

@balopat balopat added needs-rebase docs-modifications runs the docs preview service on the given PR kokoro:run runs the kokoro jobs on a PR labels Sep 11, 2019
@container-tools-bot
Copy link
Copy Markdown

Error creating deployment, please see controller logs for details.

@container-tools-bot container-tools-bot removed the docs-modifications runs the docs preview service on the given PR label Sep 11, 2019
@container-tools-bot
Copy link
Copy Markdown

Please visit http://34.94.71.232:1313 to view changes to the docs.

@container-tools-bot
Copy link
Copy Markdown

Error creating deployment, please see controller logs for details.

@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Sep 11, 2019
@balopat balopat added kokoro:run runs the kokoro jobs on a PR and removed needs-rebase labels Sep 11, 2019
Copy link
Copy Markdown
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@balopat balopat merged commit 527b897 into GoogleContainerTools:master Sep 11, 2019
@briandealwis briandealwis deleted the unified-jib branch November 11, 2019 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes kokoro:run runs the kokoro jobs on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Jib builder should autodetect Maven vs Gradle

7 participants