diff --git a/docs/reference/operator/contract.mdx b/docs/reference/operator/contract.mdx index d86a741..1a17352 100644 --- a/docs/reference/operator/contract.mdx +++ b/docs/reference/operator/contract.mdx @@ -112,6 +112,24 @@ The following environment variables will be automatically added to the attestati A link to the Gitlab CI job will be recorded in the control plane too during initialization. +### `AZURE_PIPELINE` + +The following environment variables will be automatically added to the attestation. For more information on what they mean refer to [this link](https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml). + +- `BUILD_REQUESTEDFOREMAIL` +- `BUILD_REQUESTEDFOR` +- `BUILD_REPOSITORY_URI` +- `BUILD_REPOSITORY_NAME` +- `BUILD_BUILDID` +- `BUILD_BUILDNUMBER` +- `BUILD_BUILDURI` +- `BUILD_REASON` +- `AGENT_VERSION` +- `TF_BUILD` + +A link to the Azure Pipeline build will be recorded in the control plane too during initialization. + + :::tip Remember, if all the **env variables** that you need are not defined in the context, you can extend such list via the `envAllowList` option. ::: diff --git a/examples/contracts/container-image-sbom/azure-pipeline.yaml b/examples/contracts/container-image-sbom/azure-pipeline.yaml new file mode 100644 index 0000000..c86d9a8 --- /dev/null +++ b/examples/contracts/container-image-sbom/azure-pipeline.yaml @@ -0,0 +1,13 @@ +schemaVersion: v1 + +# Require both a container image reference and a CycloneDX SBOM with the attestation happening in Azure Devops Pipeline +materials: + - type: CONTAINER_IMAGE + name: image + output: true + + - type: SBOM_CYCLONEDX_JSON + name: sbom + +runner: + type: "AZURE_PIPELINE" diff --git a/examples/contracts/empty/azure-pipeline.yaml b/examples/contracts/empty/azure-pipeline.yaml new file mode 100644 index 0000000..3042494 --- /dev/null +++ b/examples/contracts/empty/azure-pipeline.yaml @@ -0,0 +1,5 @@ +# Empty Chainloop contract valid for a workflow run in a Azure Pipeline +schemaVersion: "v1" +# See https://docs.chainloop.dev/reference/operator/contract#runner-context +runner: + type: "AZURE_PIPELINE"