Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

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

Atlassian Community Events