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

Restrict custom pipelines to specific branches

Kacper Ośko
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 1, 2023

Hi, I have a few custom branches in my repository as below. 
Screenshot 2023-08-01 at 12.21.38.png
and here's the bitbucket-pipelines.yml code:

 

pipelines:
   pull-requests:
      '**':
         - parallel:
            - step: *runDeploymentValidation

   custom:
      deploy-to-sit:
         - step: *deployToSit
      deploy-2:
         - step: *deploy2
      deploy-3:
         - step: *deploy3
      run-script:
         - variables:
            - name: SCRIPTNAME
            - name: ORGNAME
         - step: *runApexScript


How can I restrict those pipelines so that in bitbucket I would be able to run them only from specific branches (e.g. dev, uat, prod)? Right now I can run those pipelines from all branches, even feature or bugfix branch as below.Screenshot 2023-08-01 at 12.25.41.png

1 answer

0 votes
Mateus T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 1, 2023

Hi @Kacper Ośko

Welcome to the Atlassian Community!

If I understood you correctly, you would like to have only your main branches (e.g. dev, uat, prod) appear on the dropdown when triggering manual builds.

In this case, I'm afraid that this is not quite possible at the moment for manual builds, however, since this is a functionality you would like to see on our platform, I went ahead and raised a feature request with our development team, which you can check through the following link:

Our development team will give a first-hand update through that ticket if any progress is made, so I suggest keeping a watch for it. Please note that all enhancements are implemented with this policy in mind.

Thanks!

Mat

Kacper Ośko
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 2, 2023

Hi Mateus,

It's a pity that it can't restrict main branches in a manual run. But thanks You raised a feature request I hope we will able to see this feature in action soon :)

Like Mateus T likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events