Run Bitbucket Cloud Pipeline

Action ID: bitbucket:pipelines:run
NPM Package:

@backstage/plugin-scaffolder-backend-module-bitbucket-cloud

Description

Run a bitbucket cloud pipeline

Input Schema

No input schema defined for this action.

Output Schema

PropertyTypeDescriptionRequired
repoUrlstringA URL to the pipeline repository
buildNumbernumberBuild number
pipelinesUrlstringA URL to the pipeline

Usage Examples

Trigger the default pipeline after generating a new service

Runs the default Bitbucket Cloud pipeline for the repository associated with this scaffolding run. Use this right after [fetch:template] to kick off CI and surface the build number and pipeline URL in step outputs.

Copy
steps:
  - id: fetch-base
    action: fetch:template
    input:
      url: https://github.com/acme-org/software-templates/tree/main/service-node
      targetPath: .
      values:
        name: ${{ parameters.name }}
        owner: ${{ parameters.owner }}
        description: Node service scaffolded by Backstage

  - id: run-bitbucket-pipeline
    action: bitbucket:pipelines:run

Trigger a pipeline as a post-change validation step

Runs a Bitbucket Cloud pipeline to validate changes made by the template. Place this after content changes so you can use the outputs buildNumber and pipelinesUrl to inform the user or subsequent steps.

Copy
steps:
  - id: fetch-config-update
    action: fetch:template
    input:
      url: https://github.com/acme-org/software-templates/tree/main/ops/update-config
      targetPath: .
      values:
        service: ${{ parameters.service }}
        environment: ${{ parameters.environment }}
        changeId: ${{ parameters.changeId }}

  - id: validate-changes-pipeline
    action: bitbucket:pipelines:run