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

pubsys: allow refresh-repo to use default key path #1575

Merged
merged 1 commit into from
May 14, 2021

Conversation

tjkirch
Copy link
Contributor

@tjkirch tjkirch commented May 14, 2021

Description of changes:

This copies the logic from repo.rs into refresh-repo so we can refresh local repos with the default, generated key. I admit this probably isn't super useful in any production setting, but it's at least good for testing!

Testing done:

Local key:

[cargo-make] INFO - Running Task: refresh-repo
17:17:10 [INFO] Using infra config from path: /home/tjk/work/bottlerocket/Infra.toml
17:17:10 [INFO] Using repo expiration policy from path: /home/tjk/work/bottlerocket/tools/pubsys/policies/repo-expiration/2w-2w-1w.toml
17:17:10 [INFO] Loaded TUF repo: file:///home/tjk/work/bottlerocket/build/repos/default/latest/aws-k8s-1.19/x86_64
17:17:10 [INFO] Setting non-root metadata expiration times:
        snapshot:  2021-05-28 17:17:10.423431799 UTC
        targets:   2021-05-28 17:17:10.423431799 UTC
        timestamp: 2021-05-21 17:17:10.423431799 UTC
17:17:10 [INFO] Writing repo metadata to: /home/tjk/work/bottlerocket/build/repos/default/bottlerocket-1.1.0-64b14ebb/aws-k8s-1.19/x86_64
[cargo-make] INFO - Build Done in 29.06 seconds.

KMS key:

[cargo-make] INFO - Running Task: refresh-repo
17:36:41 [INFO] Using infra config from path: /home/tjk/work/bottlerocket/Infra.toml
17:36:41 [INFO] Using repo expiration policy from path: /home/tjk/work/bottlerocket/tools/pubsys/policies/repo-expiration/2w-2w-1w.toml
17:36:41 [INFO] Loaded TUF repo: file:///home/tjk/work/bottlerocket/build/repos/default/latest/aws-k8s-1.19/x86_64
17:36:41 [INFO] Setting non-root metadata expiration times:
        snapshot:  2021-05-28 17:36:41.487717816 UTC
        targets:   2021-05-28 17:36:41.487717816 UTC
        timestamp: 2021-05-21 17:36:41.487717816 UTC
17:36:41 [INFO] Writing repo metadata to: /home/tjk/work/bottlerocket/build/repos/default/bottlerocket-1.1.0-64b14ebb-dirty/aws-k8s-1.19/x86_64
[cargo-make] INFO - Build Done in 1.65 seconds.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@tjkirch tjkirch requested a review from etungsten May 14, 2021 17:37
@tjkirch tjkirch mentioned this pull request May 14, 2021
@tjkirch tjkirch merged commit b3a663b into bottlerocket-os:develop May 14, 2021
@tjkirch tjkirch deleted the refresh-repo-local branch May 14, 2021 20:08
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.

4 participants