jib icon indicating copy to clipboard operation
jib copied to clipboard

outputPaths not used in jib and jibDockerBuild tasks

Open realPyR3X opened this issue 9 months ago • 3 comments

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:

  1. set outputPaths with custom locations for digest, imageId, and imageJson
  2. run ./gradlew jibDockerBuild
  3. See it fail with NoSuchFile

Log output:

Execution failed for task ':jibDockerBuild'.

java.nio.file.NoSuchFileException: /path/to/my/digest

Additional Information:

realPyR3X avatar Mar 26 '25 02:03 realPyR3X

Hi @realPyR3X. Do you happen to have a workaround for this?

diegomarquezp avatar Sep 08 '25 19:09 diegomarquezp

I have not discovered one, sorry.

realPyR3X avatar Sep 08 '25 20:09 realPyR3X

Thanks for reporting this! One quick clarification: does this only happen when outputPaths points to a non-existing directory path?

mpeddada1 avatar Sep 11 '25 15:09 mpeddada1