Skip to content

Commit e93bf92

Browse files
authored
chore(cli): deprecate workflow contract apply in favor of top-level apply (#2887)
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
1 parent 6175a8c commit e93bf92

2 files changed

Lines changed: 4 additions & 52 deletions

File tree

app/cli/cmd/workflow_contract_apply.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@ func newWorkflowContractApplyCmd() *cobra.Command {
2626
var contractName string
2727

2828
cmd := &cobra.Command{
29-
Use: "apply",
30-
Short: "Apply a contract (create or update)",
31-
Long: `Apply a contract from a file. This command will create the contract if it doesn't exist,
32-
or update it if it already exists.`,
33-
Example: ` # Apply a contract from file
34-
chainloop workflow contract apply --contract my-contract.yaml --name my-contract --project my-project`,
29+
Use: "apply",
30+
Short: "Apply a contract (create or update)",
31+
Deprecated: "use 'chainloop apply -f <file>' instead",
32+
Hidden: true,
3533
PreRunE: func(_ *cobra.Command, _ []string) error {
3634
// Validate and extract the contract name
3735
var err error

app/cli/documentation/cli-reference.mdx

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3365,52 +3365,6 @@ Options inherited from parent commands
33653365
-y, --yes Skip confirmation
33663366
```
33673367

3368-
#### chainloop workflow contract apply
3369-
3370-
Apply a contract (create or update)
3371-
3372-
Synopsis
3373-
3374-
Apply a contract from a file. This command will create the contract if it doesn't exist,
3375-
or update it if it already exists.
3376-
3377-
```
3378-
chainloop workflow contract apply [flags]
3379-
```
3380-
3381-
Examples
3382-
3383-
```
3384-
Apply a contract from file
3385-
chainloop workflow contract apply --contract my-contract.yaml --name my-contract --project my-project
3386-
```
3387-
3388-
Options
3389-
3390-
```
3391-
-f, --contract string path or URL to the contract schema
3392-
--description string description of the contract
3393-
-h, --help help for apply
3394-
--name string contract name
3395-
--project string project name used to scope the contract, if not set the contract will be created in the organization
3396-
```
3397-
3398-
Options inherited from parent commands
3399-
3400-
```
3401-
--artifact-cas string URL for the Artifacts Content Addressable Storage API ($CHAINLOOP_ARTIFACT_CAS_API) (default "api.cas.chainloop.dev:443")
3402-
--artifact-cas-ca string CUSTOM CA file for the Artifacts CAS API (optional) ($CHAINLOOP_ARTIFACT_CAS_API_CA)
3403-
-c, --config string Path to an existing config file (default is $HOME/.config/chainloop/config.toml)
3404-
--control-plane string URL for the Control Plane API ($CHAINLOOP_CONTROL_PLANE_API) (default "api.cp.chainloop.dev:443")
3405-
--control-plane-ca string CUSTOM CA file for the Control Plane API (optional) ($CHAINLOOP_CONTROL_PLANE_API_CA)
3406-
--debug Enable debug/verbose logging mode
3407-
-i, --insecure Skip TLS transport during connection to the control plane ($CHAINLOOP_API_INSECURE)
3408-
-n, --org string organization name
3409-
-o, --output string Output format, valid options are json and table (default "table")
3410-
-t, --token string API token. NOTE: Alternatively use the env variable CHAINLOOP_TOKEN
3411-
-y, --yes Skip confirmation
3412-
```
3413-
34143368
#### chainloop workflow contract create
34153369

34163370
Create a new contract

0 commit comments

Comments
 (0)