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

Skaffold init with Jib init behaves differently in analyze mode #3060

Closed
ivanporty opened this issue Oct 15, 2019 · 3 comments · Fixed by #3062
Closed

Skaffold init with Jib init behaves differently in analyze mode #3060

ivanporty opened this issue Oct 15, 2019 · 3 comments · Fixed by #3062
Assignees
Labels
area/init build/jib kind/bug Something isn't working priority/p2 May take a couple of releases

Comments

@ivanporty
Copy link
Contributor

Skaffold v0.40

Project has Dockerfile and skaffold.yaml already present. We assume the generation of the Skaffold YAML is not necessary at this point. However:

skaffold init --analyze:

FATA[0000] pre-existing skaffold.yaml found

(expected)

skaffold init --analyze --XXenableJibInit:

{"builders":[{"name":"Docker","payload":{"path":"Dockerfile"}},{"name":"Jib Maven Plugin","payload":{"path":"pom.xml"}}],"images":[{"name":"java-hello-world","foundMatch":false}]}

(unexpected, we would notify user about skaffold YAML generation possibility although skaffold.yaml already present).

@TadCordle
Copy link
Contributor

What does the project structure look like? Is the skaffold.yaml in the same directory as the pom.xml? I think what might be happening is that it searches for an existing skaffold.yaml and for build files in the same pass, and skaffold finds a Jib config first, so it returns filepath.SkipDir and stops searching the current directory before finding skaffold.yaml.

@ivanporty
Copy link
Contributor Author

It's cloud-code-samples/java/java-hello-world, so

checkstyle.xml  
Dockerfile  
hello-world.iml  
img  
kubernetes-manifests  
pom.xml  
README.md  
skaffold.yaml  
src  
target

@TadCordle
Copy link
Contributor

Hmm yeah, I suspect that's the case then. The correct behavior should probably be to continue walking at the current level without entering any nested directories after a Jib config is found, rather than just skipping the rest of the current directory.

@TadCordle TadCordle self-assigned this Oct 15, 2019
@TadCordle TadCordle added build/jib kind/bug Something isn't working labels Oct 15, 2019
@tejal29 tejal29 added priority/p2 May take a couple of releases area/init labels Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/init build/jib kind/bug Something isn't working priority/p2 May take a couple of releases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants