Skip to content

Conversation

migmartri
Copy link
Member

Updates the attestation summary table to

  • leverage vertical space
  • Split value and digest
  • Indicate the annotations associated with the materials, this is important in the context of Advanced routing context for integrations #252, since it will be the way to show the user what annotations are mandatory.

Default behavior

$ chainloop attestation status
───────────────────┬──────────────────────────────────────┐
│ Initialized At    │ 28 Jul 23 15:14 UTC                  │
├───────────────────┼──────────────────────────────────────┤
│ Workflow          │ 3e4ef02c-0f33-4248-84be-8a55ea2e3cb0 │
│ Name              │ only-sbom                            │
│ Team              │                                      │
│ Project           │ foo                                  │
│ Contract Revision │ 7                                    │
└───────────────────┴──────────────────────────────────────┘
┌───────────────────────────────────────┐
│ Materials                             │
├─────────────┬─────────────────────────┤
│ Name        │ skynet-sbom             │
│ Type        │ SBOM_CYCLONEDX_JSON     │
│ Set         │ Yes                     │
│ Required    │ Yes                     │
│ Annotations │ ------                  │
│             │ component: controlplane │
├─────────────┼─────────────────────────┤
│ Name        │ image                   │
│ Type        │ CONTAINER_IMAGE         │
│ Set         │ Yes                     │
│ Required    │ Yes                     │
│ Annotations │ ------                  │
│             │ component: controlplane │
├─────────────┼─────────────────────────┤
│ Name        │ string                  │
│ Type        │ STRING                  │
│ Set         │ Yes                     │
│ Required    │ Yes                     │
└─────────────┴─────────────────────────┘

using the --full flag

$ chainloop attestation status --full
┌───────────────────┬──────────────────────────────────────┐
│ Initialized At    │ 28 Jul 23 15:14 UTC                  │
├───────────────────┼──────────────────────────────────────┤
│ Workflow          │ 3e4ef02c-0f33-4248-84be-8a55ea2e3cb0 │
│ Name              │ only-sbom                            │
│ Team              │                                      │
│ Project           │ foo                                  │
│ Contract Revision │ 7                                    │
└───────────────────┴──────────────────────────────────────┘
┌───────────────────────────────────────────────────────────────────────────────────────┐
│ Materials                                                                             │
├─────────────┬─────────────────────────────────────────────────────────────────────────┤
│ Name        │ skynet-sbom                                                             │
│ Type        │ SBOM_CYCLONEDX_JSON                                                     │
│ Set         │ Yes                                                                     │
│ Required    │ Yes                                                                     │
│ Value       │ sbom.cp.cyclonedx.json                                                  │
│ Digest      │ sha256:ebe2e6ffab93f4b2e2743d3557bd094427ea059adc78cfe2cd330a72f61731e8 │
│ Annotations │ ------                                                                  │
│             │ component: controlplane                                                 │
├─────────────┼─────────────────────────────────────────────────────────────────────────┤
│ Name        │ image                                                                   │
│ Type        │ CONTAINER_IMAGE                                                         │
│ Set         │ Yes                                                                     │
│ Required    │ Yes                                                                     │
│ Value       │ ghcr.io/chainloop-dev/chainloop/control-plane                           │
│ Digest      │ sha256:97deaf8ad2e31524d6e7eee65468a4330cb55f7dcf4911ebdf2a580a4261c006 │
│ Annotations │ ------                                                                  │
│             │ component: controlplane                                                 │
├─────────────┼─────────────────────────────────────────────────────────────────────────┤
│ Name        │ string                                                                  │
│ Type        │ STRING                                                                  │
│ Set         │ Yes                                                                     │
│ Required    │ Yes                                                                     │
│ Value       │ foobar                                                                  │
└─────────────┴─────────────────────────────────────────────────────────────────────────┘

Closes #279

Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
@migmartri migmartri requested a review from danlishka July 28, 2023 15:29
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
@migmartri migmartri changed the title feat(attestation): update output feat(attestation): update status output Jul 28, 2023
Copy link
Member

@danlishka danlishka left a comment

Choose a reason for hiding this comment

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

LGTM

@migmartri migmartri merged commit 5c9e84f into chainloop-dev:main Jul 29, 2023
@migmartri migmartri deleted the update-status branch July 29, 2023 20:03
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.

Apply new material summary information to attestation status
2 participants