Skip to content

Enable lazy evaluation of jib.container.creationTime and jib.container.filesModificationTime #3708

@creckord

Description

@creckord

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions