Closed sergeykad closed 3 months ago
Skaffold will always use Gradle wrapper if present for Gradle + Jib build
Gradle wrapper detected only in some scenarios.
+-------------------+
Unsupported scenarios:
cd service1 skaffold run exec: "gradle": executable file not found in $PATH
apiVersion: skaffold/v4beta11 kind: Config
requires:
Executing `skaffold run` in the project's root folder results in the same `exec: "gradle": executable file not found in $PATH` error.
This issue makes it very awkward to use Skaffold with a multimodule Grale project.
Skaffold version: 2.12.0 Operating system: Ubuntu 22.04.4 Installed via: curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 && \ sudo install skaffold /usr/local/bin/
DEBU[0002] Running command: [java -version] subtask=-1 task=Build DEBU[0002] Using wrapper for gradlew: gradle subtask=-1 task=Build DEBU[0002] Running command: [/home/user/my-project/gradlew _skaffoldFailIfJibOutOfDate -Djib.requiredVersion=1.4.0 :file-system-manager:_jibSkaffoldFilesV2 -q --console=plain] subtask=-1 task=Build
DEBU[0000] Running command: [java -version] subtask=-1 task=Build DEBU[0000] Running command: [gradle _skaffoldFailIfJibOutOfDate -Djib.requiredVersion=1.4.0 :service1:_jibSkaffoldFilesV2 -q --console=plain] subtask=-1 task=Build - service1: Error checking cache. DEBU[0000] Running command: [tput colors] subtask=-1 task=DevLoop DEBU[0000] Command output: [256 ] subtask=-1 task=DevLoop getting hash for artifact "service1": getting dependencies for "service1": could not fetch dependencies for workspace .: initial Jib dependency refresh failed: failed to get Jib dependencies: starting command gradle _skaffoldFailIfJibOutOfDate -Djib.requiredVersion=1.4.0 :service1:_jibSkaffoldFilesV2 -q --console=plain: exec: "gradle": executable file not found in $PATH
I found the relevant documentation here.
"Set the artifact’s context field to the root project location."
artifact
context
It still would be nice if the context could be detected automatically by going up in the folder tree until "gradle.settings" or Gradle wrapper script is found.
Expected behavior
Skaffold will always use Gradle wrapper if present for Gradle + Jib build
Actual behavior
Gradle wrapper detected only in some scenarios.
+-------------------+
Unsupported scenarios:
requires:
This issue makes it very awkward to use Skaffold with a multimodule Grale project.
Information
Skaffold version: 2.12.0 Operating system: Ubuntu 22.04.4 Installed via: curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 && \ sudo install skaffold /usr/local/bin/
Logs
Skaffold executed from project's root without submodules
Skaffold executed from a module/subfolder