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

feat: Add new status command #342

Merged
merged 2 commits into from Jul 19, 2022
Merged

Conversation

doanac
Copy link
Contributor

@doanac doanac commented Jul 13, 2022

This command can be used to help automation tooling decide when
metadata expirations will be reached.

 # See if timestamp metadata is expiring in the next hour:
 $ tuf status --valid-at "$(date -d '+1 hour')" timestamp

Signed-off-by: Andy Doan andy@foundries.io

Please fill in the fields below to submit a pull request. The more information that is provided, the better.

Fixes #329
Release Notes:

Types of changes:

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Description of the changes being introduced by the pull request:

Please verify and check that the pull request fulfills the following requirements:

  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

This command can be used to help automation tooling decide when
metadata expirations will be reached.

 # See if timestamp metadata is expiring in the next hour:
 $ tuf status --valid-at "$(date -d '+1 hour')" timestamp

Signed-off-by: Andy Doan <andy@foundries.io>
@doanac
Copy link
Contributor Author

doanac commented Jul 13, 2022

I'm not sure I've done the example usage well within what DocOpt might want. But this approach is working for me now with my github action:

https://github.com/doanac/fioctl/blob/main/.github/workflows/tuf.yml
https://github.com/doanac/fioctl/blob/tuf/refresh-metadata.sh (based on a prior revision of this PR)

@znewman01 znewman01 requested review from znewman01 and asraa and removed request for znewman01 July 14, 2022 15:56
Copy link
Member

@joshuagl joshuagl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting this awesome new feature.

@joshuagl joshuagl mentioned this pull request Jul 19, 2022
3 tasks
@joshuagl joshuagl merged commit af3c7d6 into theupdateframework:master Jul 19, 2022
@doanac doanac deleted the role-status branch July 19, 2022 15:12
@asraa asraa mentioned this pull request Aug 3, 2022
@asraa
Copy link
Contributor

asraa commented Aug 3, 2022

If no role is given, should we output all repository status?

@doanac
Copy link
Contributor Author

doanac commented Aug 4, 2022

i don't have a strong opinion. I think the maintainers will have better ideas about usability and consistency with regards to the rest of the project.

@asraa
Copy link
Contributor

asraa commented Aug 5, 2022

sg, just wanted to make sure issue #72 was represented completely. I agree as well. Let's table until someone needs it. Thanks!

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

Successfully merging this pull request may close these issues.

Tooling for refreshing timestamp and snapshot metadata
4 participants