You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to add a single type of artifact called Jib that auto-detects if it's a gradle or a maven build? That would make the config easier to read/write. I know the maven and gradle configs don't have the same parameters though.
Yep, we can definitely auto-detect Gradle/Maven (via detection of pom.xml or build.gradle or the respective wrappers). However, the concern is which priority to detect these in. For example, someone could have both pom.xml and build.gradle and those files could be named differently as well. The wrappers could also both be present. In any case, we would also need to provide a user configuration for Maven or Gradle as a fallback in case the auto-detection was incorrect. This detection could probably be specified via a buildFile parameter where passing in an .xml file would mean Maven and .gradle file would be Gradle.
Maybe have a jib artifact with a type property. Type would be auto-detected unless the user specifies maven or gradle. Once again, it can be changed later but I think it makes the configuration simpler.
For the Maven case we need to look for a pom.xml or a .mvn/ directory — Maven now supports a polyglot mode (e.g., using groovy or Scala or other formats for expressing the project model), so pom.xml may not exist.
I haven't seen that personally - I just sometimes have both in example projects to show using Maven and Gradle. I think this autodetect would be useful for init as well #1264 so that init creates the skaffold.yaml with the right artifact configuration.
From #1096:
@dgageot:
@coollog:
@dgageot:
@briandealwis:
@loosebazooka:
The text was updated successfully, but these errors were encountered: