proposals/archives/output_files.md
Currently Jib hardcodes the location of the files it generates during the build, such as the image ID, digest, and tar file (for tar builds). For some users, it would be useful to allow configuring the location of these output files in a way that best fits their workflows.
Jib currently doesn't allow configuring these locations, and instead it uses hardcoded defaults:
${buildDir}/jib-image.tar${buildDir}/jib-image.id${buildDir}/jib-image.digestThe proposal is to allow users to configure their build with the following rules:
clean will not delete output files created outside of the project's build directory.pom.xml)<configuration>
<outputPaths>
<tar>/absolute/location.tar</tar>
<digest>relative/path/digest</digest>
<imageId>${project.build.directory}/id</imageId>
</outputPaths>
</configuration>
build.gradle)jib {
outputPaths {
tar = "/absolute/location.tar"
digest = file("relative/path/digest")
imageId = file("$buildDir/id")
}
}
Corresponding system properties will also be added so the outputs can be set via commandline:
-Djib.outputPaths.tar-Djib.outputPaths.digest-Djib.outputPaths.imageId