Skip to content

Plugin: condition-bitbucket-pipelines

Confirms the current release is running inside Bitbucket Pipelines. Use it to gate releases so they only execute inside Bitbucket-hosted CI runs.

Terminal window
semrel plugin install @semrel/condition-bitbucket-pipelines

semrel plugin install downloads the binary to .semrel/plugins/ and updates .semrel.lock. Commit .semrel.lock to pin the version for your team.

Pre-built, signed multi-platform images (linux/amd64, linux/arm64) are published on every release:

Terminal window
docker pull ghcr.io/semrels/condition-bitbucket-pipelines:latest

Verify the image signature with cosign:

Terminal window
cosign verify ghcr.io/semrels/condition-bitbucket-pipelines:latest \
--certificate-identity-regexp 'https://github.com/SemRels/condition-bitbucket-pipelines/.github/workflows/release.yml.*' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
version: 1
plugins:
- uses: @semrel/condition-bitbucket-pipelines
phase: condition
args:
branch: main
NameRequiredDefaultDescription
SEMREL_PLUGIN_BRANCHno—Optional branch name override. When set, requires BITBUCKET_BRANCH to match this value.

This plugin does not consume any shared SEMREL_* release context variables directly.

The plugin checks the CI environment and succeeds when BITBUCKET_PIPELINE_UUID is non-empty. If SEMREL_PLUGIN_BRANCH is set, it also requires BITBUCKET_BRANCH to match. Outside Bitbucket Pipelines it exits non-zero to stop the release pipeline.