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.
Installation
Section titled “Installation”Binary
Section titled “Binary”semrel plugin install @semrel/condition-bitbucket-pipelinessemrel plugin install downloads the binary to .semrel/plugins/ and updates .semrel.lock. Commit .semrel.lock to pin the version for your team.
Docker
Section titled “Docker”Pre-built, signed multi-platform images (linux/amd64, linux/arm64) are published on every release:
docker pull ghcr.io/semrels/condition-bitbucket-pipelines:latestVerify the image signature with cosign:
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.comConfiguration
Section titled “Configuration”version: 1plugins: - uses: @semrel/condition-bitbucket-pipelines phase: condition args: branch: mainEnvironment Variables
Section titled “Environment Variables”| Name | Required | Default | Description |
|---|---|---|---|
SEMREL_PLUGIN_BRANCH | no | — | Optional branch name override. When set, requires BITBUCKET_BRANCH to match this value. |
Release Context Variables
Section titled “Release Context Variables”This plugin does not consume any shared SEMREL_* release context variables directly.
Behavior
Section titled “Behavior”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.