Enable lazy evaluation of jib.container.creationTime and jib.container.filesModificationTime
Similar to what #2727 did for image name and tags, it would be great to be able to have lazy evaluation for creationTime and filesModificationTime, e.g. to set times to the latest commit time provided by gradle-git-properties (see also #2317).
Currently, this is not easily possible, since the value in the plugin config is eagerly bound before the git properties are set. I.e. this does not work:
jib {
container {
creationTime = project.provider { project.ext.git['git.commit.time'] }
}
}
tasks.jib.dependsOn generateGitProperties
tasks.jibBuildTar.dependsOn generateGitProperties
tasks.jibDockerBuild.dependsOn generateGitProperties
Thank you for creating this issue and opening the PR @creckord! As mentioned in the PR, we will wait for the CLA to signed to review your contribution.
Just a quick life sign - it took a bit for the CLA to pass our legal, but I have that now, right in time for my 3-week vacation in offline land. I'll fix the open issues in the PR when I'm back.
Thank you!
jib-gradle-plugin 3.3.1 has been released with this feature. Thanks again for your contribution!