fleet/tools/tuf/status
Roberto Dip 37233112b2
add a tool to check the status of a TUF server (#8428)
Motivation: I often find myself digging through the XML in https://tuf.fleetctl.com to see if/when/what packages have been published in the different release channels, this tool aims to make the process less painful.

```
~/fleet $ go run tools/tuf/status/status.go --help
This is a CLI utility to fetch and filter the entries posted by a TUF repository.
  -key-filter string
    	filter keys using a regular expression (default "stable")
  -url string
    	URL of the TUF repository (default "https://tuf.fleetctl.com")
```

### Examples

- To filter all items on the edge channel use `--key-filter="edge"`
- To filter all items on version `1.3` including patches that run on Linux use `--key-filter="linux/1.3.*"`
- To filter Fleet Desktop items on `1.3.*`, `stable` and `edge` that run on macOS use `--key-filter="desktop/*.*/macos/(1.3.*|stable|edge)"`

### Example output

```
~/fleet $ go run tools/tuf/status/status.go --key-filter="desktop/*.*/macos/(1.3.*|stable|edge)"

Results filtered by "desktop/*.*/macos/(1.3.*|stable|edge)" and sorted by version, platform and key.

VERSION	PLATFORM	KEY                                            	LAST MODIFIED           	SIZE   	ETAG
1.3    	macos   	targets/desktop/macos/1.3/desktop.app.tar.gz   	2022-10-20T00:42:58.000Z	28.4 MB	"ceb7a975880db6ab9aea7907915406e3-4"	
1.3.0  	macos   	targets/desktop/macos/1.3.0/desktop.app.tar.gz 	2022-10-20T00:42:58.000Z	28.4 MB	"ceb7a975880db6ab9aea7907915406e3-4"	
1.3.1  	macos   	targets/desktop/macos/1.3.1/desktop.app.tar.gz 	2022-10-21T20:28:24.000Z	28.5 MB	"3c6641a0df00009f3f076bd6b4fbc748-4"	
edge   	macos   	targets/desktop/macos/edge/desktop.app.tar.gz  	2022-10-21T20:28:37.000Z	28.5 MB	"3c6641a0df00009f3f076bd6b4fbc748-4"	
stable 	macos   	targets/desktop/macos/stable/desktop.app.tar.gz	2022-10-20T00:43:06.000Z	28.4 MB	"ceb7a975880db6ab9aea7907915406e3-4"	
```
2022-10-24 17:20:06 -03:00
..
README.md add a tool to check the status of a TUF server (#8428) 2022-10-24 17:20:06 -03:00
status.go add a tool to check the status of a TUF server (#8428) 2022-10-24 17:20:06 -03:00

TUF status

~/fleet $ go run tools/tuf/status/status.go --help

This is a CLI utility to fetch and filter the entries posted by a TUF repository.

  -key-filter string
    	filter keys using a regular expression (default "stable")
  -url string
    	URL of the TUF repository (default "https://tuf.fleetctl.com")


Examples

- To filter all items on the edge channel use --key-filter="edge"
- To filter all items on version 1.3 including patches that run on Linux use --key-filter="linux/1.3.*"
- To filter Fleet Desktop items on 1.3.*, stable and edge that run on macOS use --key-filter="desktop/*.*/macos/(1.3.*|stable|edge)"