Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Manual pipeline for branching strategy pipeline

Anusha NG March 13, 2024

Hello Team,

I have created bitbucket pipeline as per branches whenever we do commits on branch then it will trigger the pipeline. We want to make this process manual.
Can you please suggest on the same?

pipelines:
branches:
Dev:
- step:
script:
- ant -buildfile build/build.xml deployEmptyCheckOnly -Dsfdc.username=$SFDC_USERNAME -Dsfdc.password=$SFDC_PASS$SFDC_TOKEN -Dsfdc.serverurl=https://$SFDC_SERVERURL
Master:
- step:
script:
- ant -buildfile build/build.xml deployEmptyCheckOnly -Dsfdc.username=$SFDC_USERNAME1 -Dsfdc.password=$SFDC_PASS1$SFDC_TOKEN1 -Dsfdc.serverurl=https://$SFDC_SERVERURL

2 answers

0 votes
Anusha NG March 13, 2024

Hello Matija
Thank you for the quick response.

I have tried custom pipeline and manual trigger as mentioned below but still if I commit on Dev branch then pipeline starts. We cannot add trigger in 1st step.

pipelines:
custom:
ManualSteps:
- step:
script:
- echo "Hello";
branches:
Dev:
- step:
script:
- echo "Hello"
- step:
trigger: 'manual'
script:

Matija Varjacic March 13, 2024

If you want only manual pipeline then you just need to keep the first part.

pipelines:
custom: # Pipelines that can only be triggered manually
ManualPipeline:
- step:
script:
- echo "This can only be triggered manually!"
Anusha NG March 13, 2024

How to mention the branches?

Matija Varjacic March 14, 2024

If you run manually you don't need to mention the branch. You choose a branch  when you go run it. You can run it from the Branches page (last column Actions -> Run pipeline for a branch" or Pipelines page.

0 votes
Matija Varjacic March 13, 2024

You can either make steps manual by adding trigger: manual or make a custom pipeline that won't be triggered automatically.


https://support.atlassian.com/bitbucket-cloud/docs/pipeline-triggers/

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events