Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
creckord opened this issue Jul 19, 2022 · 4 comments · Fixed by #3709
Closed

Comments

@creckord
Copy link
Contributor

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
@mpeddada1
Copy link
Contributor

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.

@creckord
Copy link
Contributor Author

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.

@elefeint
Copy link
Contributor

Thank you!

creckord added a commit to creckord/jib that referenced this issue Sep 21, 2022
…ers with Property (GoogleContainerTools#3708)

* Removes String getters/setters
* Adds getter for Property instead
creckord added a commit to creckord/jib that referenced this issue Sep 21, 2022
creckord added a commit to creckord/jib that referenced this issue Sep 21, 2022
…ers with Property (GoogleContainerTools#3708)

* Removes String getters/setters
* Adds getter for Property instead
creckord added a commit to creckord/jib that referenced this issue Sep 21, 2022
…ers with Property (GoogleContainerTools#3708)

* Removes String getters/setters
* Adds getter for Property instead
creckord added a commit to creckord/jib that referenced this issue Sep 21, 2022
…ers with Property (GoogleContainerTools#3708)

* Removes String getters/setters
* Adds getter for Property instead
@emmileaf
Copy link
Contributor

jib-gradle-plugin 3.3.1 has been released with this feature. Thanks again for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants