chainloop icon indicating copy to clipboard operation
chainloop copied to clipboard

feat(cli): improve attestation push result in table format

Open jiparis opened this issue 1 year ago • 0 comments

This PR improves the way att push result is shown. It uses now the status action logic (in full mode) before running the actual push to gather all the information from the current attestation.

✗ go run app/cli/main.go --insecure --token $TOKEN att push --key ./cosign.key
WRN API contacted in insecure mode
Enter password for private key:
INF push completed
┌───────────────────┬──────────────────────────────────────┐
│ Initialized At    │ 17 May 24 11:11 UTC                  │
├───────────────────┼──────────────────────────────────────┤
│ Attestation ID    │ efb770a4-203f-4bba-9310-50272e39de26 │
│ Name              │ mywf                                 │
│ Team              │                                      │
│ Project           │ myproj                               │
│ Contract Revision │ 2                                    │
└───────────────────┴──────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────────────────────────┐
│ Materials                                                                           │
├───────────┬─────────────────────────────────────────────────────────────────────────┤
│ Name      │ foo                                                                     │
│ Type      │ ARTIFACT                                                                │
│ Set       │ Yes                                                                     │
│ Required  │ Yes                                                                     │
│ Is output │ Yes                                                                     │
│ Value     │ contract.json                                                           │
│ Digest    │ sha256:7d2681cd27240354f571b662108ca73c78fb2a6130aa6dc16e04af8905e4c361 │
└───────────┴─────────────────────────────────────────────────────────────────────────┘
INF Attestation Digest: sha256:eea3b1f58ed98b8b548321f850a751b0a8f066fc2cc3734781225a8d6fbc6608

Closes #750

jiparis avatar May 17 '24 11:05 jiparis