outputPaths not used in jib and jibDockerBuild tasks
Environment:
- Jib version: latest
- Build tool: gradle
- OS: linux
Description of the issue:
Settings outputPaths as follows:
outputPaths { def baseOutputPath = project.layout.buildDirectory.dir('jib').get().file("${appName}-${version}").toString() tar = "${baseOutputPath}.tar" digest = "${baseOutputPath}.digest" imageId = "${baseOutputPath}.id" imageJson = "${baseOutputPath}.json" }
works as expected for jibBuildTar. However, they are not generated for the jib and jibDockerBuild tasks resulting in an error there is NoSuchFile
Expected behavior:
jib and jibDockerBuild produce the digest, imageId, and imageJson at the locations specified (they do generate the default names if outputPaths is empty).
Also the documentation does not document the imageJson (I discovered it from the code)
Steps to reproduce:
- set outputPaths with custom locations for digest, imageId, and imageJson
- run ./gradlew jibDockerBuild
- See it fail with NoSuchFile
Log output:
Execution failed for task ':jibDockerBuild'.
java.nio.file.NoSuchFileException: /path/to/my/digest
Additional Information:
Hi @realPyR3X. Do you happen to have a workaround for this?
I have not discovered one, sorry.
Thanks for reporting this! One quick clarification: does this only happen when outputPaths points to a non-existing directory path?