-
Notifications
You must be signed in to change notification settings - Fork 165
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 setting SOURCE_DATA_EPOCH #1032
Conversation
This environment variable is the timestamp for created time in app image config Fixes #1009 Signed-off-by: Yael Harel <yharel@vmware.com>
Co-authored-by: Tom Kennedy <10608054+tomkennedy513@users.noreply.github.com>
Do we want this feature to be also configurable at the controller level or at just the image level |
Signed-off-by: Yael Harel <yharel@vmware.com>
Should we try and match the pack behavior for this? i.e. allowing users to provide a iso timestamp or the word |
I think kpack needs to support the same configuation options as pack and this should be a non-boolean field that accepts similar inputs to pack's |
@yaelharel A |
@samj1912 @matthewmcnew @yaelharel does using a timestamp make sense as an input to the |
@yaelharel let's support both unix timestamp and |
Signed-off-by: Yael Harel <yharel@vmware.com>
@@ -164,6 +165,14 @@ func (ib *ImageBuild) Validate(ctx context.Context) *apis.FieldError { | |||
} | |||
} | |||
|
|||
if ib.CreationTime != "" && ib.CreationTime != "now" { | |||
// check that the timestamp in CreationTime is in valid format | |||
_, err := strconv.ParseInt(ib.CreationTime, 10, 64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!
let's hold off on merging this until kpack 0.7.1 is released: https://github.com/pivotal/kpack/milestone/6 |
Codecov Report
@@ Coverage Diff @@
## main #1032 +/- ##
==========================================
- Coverage 70.44% 70.05% -0.39%
==========================================
Files 122 122
Lines 5742 5768 +26
==========================================
- Hits 4045 4041 -4
- Misses 1321 1340 +19
- Partials 376 387 +11
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
This environment variable is the timestamp for created time in app image config
Fixes #1009
Signed-off-by: Yael Harel yharel@vmware.com