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

Ignore Jib project name when skaffold init only finds one module #2850

Closed
wants to merge 1 commit into from
Closed

Ignore Jib project name when skaffold init only finds one module #2850

wants to merge 1 commit into from

Conversation

TadCordle
Copy link
Contributor

Fixes #2844

@GoogleContainerTools/java-tools-build

@@ -156,7 +156,11 @@ func ValidateJibConfig(path string) []Jib {
return nil
}

results[i] = Jib{BuilderName: builderType.Name(), Image: parsedJSON.Image, FilePath: path, Project: parsedJSON.Project}
results[i] = Jib{BuilderName: builderType.Name(), Image: parsedJSON.Image, FilePath: path}
Copy link
Member

Choose a reason for hiding this comment

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

What happens if a multi-module project has only one sub-module? That is, a root pom.xml (<packaging>pom) and a single sub-directory for one module. Does jib:skaffold-init return one BEGIN JIB JSON?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can double check, but I think it returns one for the root project and one for the module.

Copy link
Contributor Author

@TadCordle TadCordle Sep 10, 2019

Choose a reason for hiding this comment

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

Can confirm it does this, but that also may not be a good thing in the first place to count the root project in a multi-module situation as a valid project to choose from in skaffold init... hmm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm beginning to think this is best fixed Jib-side. I'm going to mess around with Jib and see if I can get somewhere close, and if so then I'll close this.

@TadCordle TadCordle closed this Sep 10, 2019
@codecov
Copy link

codecov bot commented Sep 10, 2019

Codecov Report

Merging #2850 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted Files Coverage Δ
pkg/skaffold/jib/jib_init.go 89.85% <100%> (+0.3%) ⬆️

1 similar comment
@codecov
Copy link

codecov bot commented Sep 10, 2019

Codecov Report

Merging #2850 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted Files Coverage Δ
pkg/skaffold/jib/jib_init.go 89.85% <100%> (+0.3%) ⬆️

@TadCordle TadCordle deleted the i2844-jib-init-fix branch September 10, 2019 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"skaffold init" generates incorrect config for Jib project
3 participants