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

Open Use SOURCE_DATE_EPOCH to configure image create time #809

Closed
natalieparellano opened this issue Feb 25, 2022 · 3 comments
Closed

Open Use SOURCE_DATE_EPOCH to configure image create time #809

natalieparellano opened this issue Feb 25, 2022 · 3 comments
Assignees
Labels
status/ready type/enhancement New feature or request

Comments

@natalieparellano
Copy link
Member

Description

See related RFC: buildpacks/rfcs#204 (blocking)

See related imgutil PR: buildpacks/imgutil#137

There is currently an open question around how this should be implemented (in imgutil or the lifecycle). Depending on what is decided, this might not require any further work.

@natalieparellano
Copy link
Member Author

natalieparellano commented Mar 9, 2022

There seems to be general agreement that the "alternate" approach mentioned in the RFC is preferred:

have the exporter read the variable and provide it via a new SetCreatedAt() method on the imgutil.Image interface

There is still some discussion around whether the env var should be SOURCE_DATE_EPOCH or CNB_SOURCE_DATE_EPOCH, but I think we could unblock this because it would be very easy to change it later.

@jabrown85 jabrown85 self-assigned this Mar 9, 2022
jabrown85 added a commit to buildpacks/imgutil that referenced this issue Mar 9, 2022
This will be used when resolving buildpacks/lifecycle#809. The caller being able to adjust the value will allow us to read the value from different inputs if needed and won't tie imgutil to a specific env var.

Signed-off-by: Jesse Brown <jabrown85@gmail.com>
jabrown85 added a commit that referenced this issue Mar 10, 2022
Platforms can set `SOURCE_DATE_EPOCH` to control the timestamp on the exported app images.

See #809 for more details.

Signed-off-by: Jesse Brown <jabrown85@gmail.com>
natalieparellano pushed a commit that referenced this issue Mar 10, 2022
* Support SOURCE_DATE_EPOCH

Platforms can set `SOURCE_DATE_EPOCH` to control the timestamp on the exported app images.

See #809 for more details.

Signed-off-by: Jesse Brown <jabrown85@gmail.com>

* Fixing 0.9 skip-layers test

Signed-off-by: Jesse Brown <jabrown85@gmail.com>

* Added 0.9 exiter test

Signed-off-by: Jesse Brown <jabrown85@gmail.com>
@natalieparellano
Copy link
Member Author

Resolved by #823

@thedevelopnik
Copy link

Thank you so much! This is a long-awaited feature and I am so grateful it landed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/ready type/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants