No reload with skaffold dev on Kotlin code when using Jib with Java + Kotlin
See original GitHub issueExpected behavior
I am expecting the skaffold dev
to reload a new “version” of the app on each modification of a java + kotlin project built with Jib.
Actual behavior
The skaffold dev
doesn’t detect any changes on the file system when I change code in the Kotlin part.
Information
- Skaffold version: v0.37.1
- Operating system: macOS
- Contents of skaffold.yaml:
apiVersion: skaffold/v1beta13
kind: Config
build:
artifacts:
- image: podcastserver/backend
context: backend
jibMaven:
args:
- liquibase:dropAll
- liquibase:update
- jooq-codegen:generate
- compile
- -Dmaven.test.skip
deploy:
kustomize:
path: backend/src/main/k8s/docker-for-mac/
Extra information:
I’ve dug a little into the skaffold
and jib
implementation and found out skaffold
execute the following command to define files to watch:
mvn jib:_skaffold-files-v2 -q
And the current result for this command is the following in my project:
{
"build": [
"/Users/kevin/Workspace/gitlab.com/davinkevin/Podcast-Server/backend/pom.xml"
],
"inputs": [
"/Users/kevin/Workspace/gitlab.com/davinkevin/Podcast-Server/backend/src/main/java",
"/Users/kevin/Workspace/gitlab.com/davinkevin/Podcast-Server/backend/src/main/resources",
"/Users/kevin/Workspace/gitlab.com/davinkevin/Podcast-Server/backend/src/main/resources",
"/Users/kevin/Workspace/gitlab.com/davinkevin/Podcast-Server/backend/src/main/jib"
],
"ignore": []
}
So, it seems to only look for files into src/main/java
. I don’t know if my project follows the “maven state of the art configuration for Java + Kotlin”, but I didn’t find any information about this use case.
It should be good to be able to configure manually or take some folder if they exist.
PS: I think the title of the issue is very bad, but I didn’t find anything better, so I let you change it if you have a better idea !
Steps to reproduce the behavior
git clone git@gitlab.com:davinkevin/Podcast-Server.git
(orgit clone https://gitlab.com/davinkevin/Podcast-Server.git
if it doesn’t work)cd podcast-server
./dev.sh
which trigger some file system init (in /tmp folder) required by the app and then launch askaffold dev
command- Do any modification on a file located inside
backend/src/main/kotlin/...
and see there is no “reload” from theskaffold dev
command.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (6 by maintainers)
#2010 makes
jib:_skaffold-files-v2
to extract path values from<sourceDir>
configured on the Kotlin Maven plugin. The next Jib version will support this use case.Haven’t looked into the Gradle side. I’ll re-open the issue for tracking.
All is working perfectly 🎉with skaffold 0.41.0 and jib 1.7.0. Thanks to all