Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to pass multiple pattern to custom bitbucket pipeline API inside Target block ?


I want to invoke a custom bitbucket pipeline via custom BitBucket API. Is there a way I can pass multiple patterns in the below command calling the API ?

At present, I am able to run only one pipeline create-aws-account via the command line (Bit bucket API). 

Note: I want to run the yaml file mentioned in below sequence via the custom bitbucket API command  : 

  • create-aws-account
  • set-sso-permissions
  • run-cloudhealth-pipeline
  • run-tekton-pipeline



curl -X POST -is -u uname:password \

        -H 'Content-Type: application/json' \ \

        -d '


            "target": { 

            "type": "pipeline_ref_target",

            "ref_type": "branch",

            "ref_name": "master",

            "selector": {

            "type": "custom",

            "pattern": "create-aws-account"



        "variables": [


            "key": "account_id",

            "value": "02020202",

            "secured": true




Below is my Pipeline code bitbucket-pipelines.yml and I want to run them sequentially one after the other. 




      - variables:

          - name: account_id # single string (required)

      - step: *tfapply


      - variables:

          - name: aws_account_id # single string (required)

          - name: aws_region # us-east-1 or ca-central-1

      - step: *aws_sso_access


      - variables:

          - name: aws_account_name

          - name: aws_account_id

      - step: *cloudhealth_pipeline


      - variables:

          - name: account_id # single string (required)

          - name: app_id # single string (optional)

      - step: *tekton_pipeline


1 answer

0 votes
Mark C Atlassian Team Sep 17, 2021

Hi @Ranopriyo Neogy

Thank you for reaching out to the community.

I'm afraid it's not possible for you to run multiple patterns for your custom steps in your Pipelines YAML configuration as the API only works for a single trigger.

If you want to trigger the other custom steps, you will have to run multiple Curl commands with different patterns.

Let me know if you have any further questions.

Mark C

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

166 views 2 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you