Skip to content

add: add a new --timestamp flag #6178

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
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nalind
Copy link
Member

@nalind nalind commented May 20, 2025

What type of PR is this?

/kind feature

What this PR does / why we need it:

Add a "--timestamp" flag to the "add" and "copy" CLIs, along with a corresponding field in AddAndCopyOptions.

When a timestamp is set, we'll force the timestamp on data copied in to be the specified value while reading it, so that the content will have the specified datestamp in the rootfs and when the image is committed.

How to verify it

Updated unit test!
New integration test!

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

Does this PR introduce a user-facing change?

`buildah add` now offers a "--timestamp" flag.

@openshift-ci openshift-ci bot added the kind/feature Categorizes issue or PR as related to a new feature. label May 20, 2025
Copy link
Contributor

openshift-ci bot commented May 20, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nalind

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

Ephemeral COPR build failed. @containers/packit-build please check.

@nalind nalind force-pushed the add-timestamp branch 2 times, most recently from 7904b43 to 2adc23a Compare May 20, 2025 21:55
nalind added 2 commits May 21, 2025 09:51
Add some helper functions for parsing the information from dir: and oci:
locations that we'd just have to do over and over with minor variations,
to try to save some time and a refactor down the road.

Signed-off-by: Nalin Dahyabhai <[email protected]>
Add a --timestamp flag to the "add" and "copy" CLIs, along with a
corresponding field in AddAndCopyOptions.

When a timestamp is set, we'll force the timestamp on data copied in to
be the specified value while reading it, so that the content will have
the specified datestamp in the rootfs and when the image is committed.

Signed-off-by: Nalin Dahyabhai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant