gable
CLI, but we recommend configuring your contract repo to publish contracts in a CI/CD workflow, and provide out-of-the-box solutions for common CI/CD platforms.
Publishing contracts is an idempotent operation! If the contents of a contract file have not been changed, the result is a no-op, so it’s safe to publish all contracts within the central contract repository on every update to the main branch.
While the publishing step verifies that a contract is valid before storing it in Gable, we recommend adding a validation step in CI/CD that runs on all all branches to prevent invalid contracts from being merged into the main branch, and to give contract authors immediate feedback of any issues with their proposed contract changes.
Validate Action
Publish Action
github.ref
context value. Make sure you use the correct name for your contract repository’s main branch!Full Workflow Example
Example
https://<your_organization>.gable.ai/contracts
. The contract table view displays a list of existing contracts with information on domain, ownership, descriptions, and contract status.
Create Contract
in the upper right. You can also click the </>
button to generate a YAML contract definition.
To create a contract based on an asset, either click the contract icon in the Assets table or navigate to the Asset Details page and click Create Contract
in the upper right. The contract definition will be pre-populated based on that asset schema. Fields can be added, edited, and removed. Check an asset’s compliance with the Check asset
button.
Publish
button. Once published, you will see an Active
badge by the contract name in the Contracts table and on the contract details page. Contract enforcement will not take effect until the contract is published.
Archived
or moved back to Draft
mode by clicking on the Revert to Draft
option from the Manage
menu.
Archived
. Archived contracts will be hidden in the Contracts table by default. If you need to access them, just adjust your filter settings to include archived contracts. To bring an archived contract back, click the Manage button and select Revert to Draft
. From there, you can make any necessary changes to the contract before publishing it.