Closed hpuac closed 2 years ago
This problem can be fixed by change the context to tell Skaffold
to use gradle
file in root level and specifying the name of the project you want to build(name of the project can be found by running gradle projects
).
apiVersion: skaffold/v2beta29
kind: Config
metadata:
name: hello-jib
build:
artifacts:
- image: hello-jib
jib:
type: gradle
project: [PROJECT-NAME]
context: ..
local:
push: false
deploy:
kubectl:
manifests:
- k8s/deploy.yaml
Skaffold tries to run the following command during the Jib build:
gradle _skaffoldFailIfJibOutOfDate -Djib.requiredVersion=1.4.0 :_jibSkaffoldFilesV2
But the_jibSkaffoldFilesV2
task gets executed on the root project. In a multi-module gradle project this task does not exist on the root project.Expected behavior
I would expect Skaffold to support the Jib build in a multi-module gradle project.
Actual behavior
Skaffold is failing during the Jib build in a multi-module gradle project.
Information
Steps to reproduce the behavior
skaffold build -v debug
or rungradle _skaffoldFailIfJibOutOfDate -Djib.requiredVersion=1.4.0 :_jibSkaffoldFilesV2
directlyTask '_jibSkaffoldFilesV2' not found in root project 'jib-multimodule'.