Run pipelines manually

Manual steps

Manual steps allows you to customize your CI/CD pipeline by making some steps only run when someone manually triggers them. This is useful for steps like deployment steps, where some manual testing or checks need to happen before the step runs.

Configure a step as manual by adding  trigger: manual to the step in your bitbucket-pipelines.yml file.

As pipelines trigger on a commit, you can't make the first step manual. If you'd like a pipeline to only run manually, you can set up a custom pipeline instead. Another advantage of a custom pipeline is that you can temporarily add or update values for your variables , for example to add a version number, or supply a single use value.

Manual pipelines

Any existing pipeline can also be manually run against a specific commit, or as a scheduled build.

If you want a pipeline to only run manually then use a custom pipeline. Custom pipelines do not run automatically on a commit to a branch. To define a custom pipeline, add the pipeline configuration in the  custom  section of your bitbucket-pipelines.yml file. Pipelines which are not defined as a custom pipeline will also run automatically when a push to the branch occurs.

You'll need write permission on the repository to run a pipeline manually, and you can trigger it from the Bitbucket Cloud UI.

Step 1: Add a pipeline to the bitbucket-pipelines.yml file

You can manually trigger a build for any pipeline build configuration included in your bitbucket-pipelines.yml file:

  custom: # Pipelines that can only be triggered manually
      - step:
            - echo "Manual triggers for Sonar are awesome!"
      - step:
            - echo "Manual triggers for deployments are awesome!"
  branches:  # Pipelines that run automatically on a commit to a branch can also be triggered manually
      - step:
            - echo "Automated pipelines are cool too."

Step 2: Trigger the pipeline from Bitbucket Cloud

Pipelines can be triggered manually from either the Branches view or the Commits view in the Bitbucket Cloud interface.

Run a pipeline manually from the Branches view

Click to see details...
  1. Go to the Branches view in Bitbucket.
  2. Click on the Actions menu for the branch you want to run a pipeline for, then click Run pipeline for a branch:
  3. Choose a pipeline, then click Run:

Run a pipeline manually from the Commits view

Click to see details...
  1. Go to the Commits view for a commit (click Commits, then a commit hash). 
  2. Click Run pipeline:
  3. Choose a pipeline, then click Run:
Last modified on May 24, 2019

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.