Skip to content

keys: Add "fioctl keys tuf download-roots" command#541

Merged
doanac merged 1 commit into
foundriesio:mainfrom
doanac:download-roots
Jul 13, 2026
Merged

keys: Add "fioctl keys tuf download-roots" command#541
doanac merged 1 commit into
foundriesio:mainfrom
doanac:download-roots

Conversation

@doanac

@doanac doanac commented Jul 9, 2026

Copy link
Copy Markdown
Member

Downloads all versions of a Factory's TUF root.json files (CI or, with --prod, production) into a single gzip'd tarball, incrementing the version until the server returns a 404.

@doanac

doanac commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

This is being added to help with: foundriesio/update-server#199

@vkhoroz vkhoroz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment thread subcommands/keys/tuf_download_roots.go Outdated
root, err = getRoot(factory, ver)
if err != nil {
if herr := client.AsHttpError(err); herr != nil && herr.Response.StatusCode == 404 {
break

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe, write some success message at the end?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Its currently outputting

$ fioctl keys tuf download-roots --prod /tmp/roots.tgz
= Adding 1.root.json
= Adding 2.root.json
= Adding 3.root.json
= Adding 4.root.json
= Adding 5.root.json
= Adding 6.root.json
= Adding 7.root.json
= Adding 8.root.json
= Adding 9.root.json

We generally (we aren't totally consistent) don't print a "success" message at the end of a command.

Downloads all versions of a Factory's TUF root.json files (CI or,
with --prod, production) into a single gzip'd tarball, incrementing
the version until the server returns a 404.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Andy Doan <andy@foundries.io>
@doanac doanac merged commit 9b0a6e7 into foundriesio:main Jul 13, 2026
3 checks passed
@doanac doanac deleted the download-roots branch July 13, 2026 14:57
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.

2 participants