Skip to content

att init: create contract on workflow creation #1902

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

Merged
merged 2 commits into from
Mar 14, 2025

Conversation

jiparis
Copy link
Member

@jiparis jiparis commented Mar 13, 2025

This PR allows to reuse --contract flag in att init to specify a contract file or URL to be used if the workflow has to be created. In this case, it will first create the contract with the file contents and pass the reference to the Workflow/Create call.

✗ chainloop att init --name qs-contract --project myproject --contract qs-contract.yaml --replace
INF Attestation initialized! now you can check its status or add materials to it
┌───────────────────────────┬──────────────────────────────────────┐
│ Initialized At            │ 13 Mar 25 19:27 UTC                  │
├───────────────────────────┼──────────────────────────────────────┤
│ Attestation ID            │ 5ba1b703-78f8-4e0f-825b-9cff3e4df7e8 │
│ Organization              │ my-org                               │
│ Name                      │ qs-contract                          │
│ Project                   │ myproject                            │
│ Version                   │ v0.181.0 (prerelease)                │
│ Contract                  │ myproject-qs-contract (revision 1)   │
│ Policy violation strategy │ ADVISORY                             │
└───────────────────────────┴──────────────────────────────────────┘

Fixes #1901

Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
@jiparis jiparis requested a review from migmartri March 13, 2025 19:29
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
@jiparis jiparis merged commit 782f50e into chainloop-dev:main Mar 14, 2025
13 checks passed
@jiparis jiparis deleted the 1901-contracts branch March 14, 2025 09:15
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.

Create contract on att init when the workflow is created
2 participants