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 for Java applications #1264

Closed
saturnism opened this issue Nov 9, 2018 · 6 comments
Closed

skaffold init for Java applications #1264

saturnism opened this issue Nov 9, 2018 · 6 comments

Comments

@saturnism
Copy link

Expected behavior

skaffold init on a Java project (with Maven or Gradle) will produce the default skaffold.yaml with the corresponding Jib builder configuration.

Actual behavior

skaffold init requires Dockerfile to be present and fails with:
FATA[0001] one or more valid Dockerfiles must be present to run skaffold; please provide at least one Dockerfile and try again

However, Dockerfile is not needed for Jib.

Information

  • Skaffold version: 0.17
  • Operating system: OSX

Steps to reproduce the behavior

  1. Create a new Java project that uses either Maven or Gradle.
  2. Run skaffold init
@saturnism
Copy link
Author

@dgageot
Copy link
Contributor

dgageot commented Nov 9, 2018

That's a duplicate of #1093 but I'm going to keep your ticket because it's more detailed :-)

@coollog
Copy link
Contributor

coollog commented Nov 9, 2018

Some options for when there might be a mix of Dockerfiles and Maven/Gradle.

  • default to Dockerfile if present, choose between Dockerfiles if multiple
  • default to Maven/Gradle if pom.xml/mvnw/build.gradle/gradlew detected, choose between Maven/Gradle if both present
  • survey with choices for use Dockerfile, jibGradle, or jibMaven

I think we should go with the survey with all the choices since otherwise, it would be hard to differentiate which artifact should use which.

@loosebazooka
Copy link
Member

I like the survey idea.

Is skaffold init designed to only work for single artifacts at the moment? I imagine it would get pretty complex pretty fast if it started searching for one or more artifacts to configure.

@briandealwis
Copy link
Member

I wondered about handling multi-module projects. I guess we could look for locations with a pom.xml or .mvn directory, and then try jib:_skaffold-package-goals. And similarly for Gradle.

@dgageot
Copy link
Contributor

dgageot commented Nov 7, 2019

This can be close, we are waiting for #2842 to make this feature active.

@dgageot dgageot closed this as completed Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants