Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Pipelines: can pipeline triggers trigger parameterised pipelines?

Paul Hicks
Contributor
July 8, 2026

I've been trying out triggered pipelines (using the `triggers` section, as opposed to traditional selectors under `pipelines`). For simple custom pipelines it's working great, but I'd now like to invoke a custom pipeline with variables. Consider this sort of custom pipeline:

    check-environment:
      - variables:
          - nameenv
            defaultdev
            allowed-values:
              - dev
              - test
              - prod
      - step:
          - script: # ...
If the `variables` section isn't there, then this trigger works:
triggers:
  pullrequest-push:
    - condition: *anyChange
      pipelines:
        - check-environment
But since the `pipelines` array is defined to be strings, I can't do anything "intuitive" like this:
triggers:
  pullrequest-push:
    - condition: *anyChange
      pipelines:
        - pipeline:
             name: check-environment
             variables:
               - env: test
Is there a way to invoke the custom pipeline above from a pipeline trigger like this? What is the syntax? A link to the docs would be great, too.

2 answers

1 accepted

1 vote
Answer accepted
Paul Hicks
Contributor
July 8, 2026

I have come up with a workaround that I'll call "deparameterisation". Using child pipeline input variables, you can hard code parameters into parent pipelines:

    check-environment:
      - variables:
          - name: env
            default: dev
            allowed-values:
              - dev
              - test
- prod


      - step:
          script: # ...


    check-environment-dev:
      steps:
        - step:
            name: Run `check-environemnt` against dev
            type: pipeline
            custom: check-environment
            input-variables:
              env: dev

    check-environment-test:
      steps:
        - step:
            name: Run `check-environemnt` against test
            type: pipeline
            custom: check-environment
            input-variables:
              env: test

It is reasonably horrendous, creating a plethora of nearly-meaningless custom pipelines, but at least the script is DRY. Until the `triggers` section supports pipelines as something more than plain strings, I think this will have to do :(

0 votes
Saxea _Flowie_
Atlassian Partner
July 8, 2026

Hi @Paul Hicks ,

If I understood it correctly, what you are trying to do is not supported since custom pipelines can only be triggered manually.

Depending on what you are trying to do a dynamic pipelines could also help.

Our Bitbucket app, Flowie supports this kind of pattern via the smart pipelines plugin. You can trigger the custom pipeline and provide different variables based on any of the conditions, including target branch and labels.

Hope this helps.

Paul Hicks
Contributor
July 8, 2026

The documentation you linked to is apparently out of date (by a few years, I think).

Custom pipelines can be triggered manually, via shared configuration (pipeline: import), schedules, and (as I'm doing here) new-style triggers. The custom pipeline part isn't the problem: that's all working fine. The problem is invoking custom pipelines from new-style triggers: only the custom pipeline name can be provided in the `pipelines` array. The array is typed to strings, only. There is no way to pass in variables.

See below links for definitions on how to use custom pipelines in these other ways.

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

https://support.atlassian.com/bitbucket-cloud/docs/share-pipelines-configurations/

https://support.atlassian.com/bitbucket-cloud/docs/pipeline-start-conditions/#Trigger-type

Saxea _Flowie_
Atlassian Partner
July 8, 2026

I see what you mean now - thanks for clarifying it!

Like Paul Hicks likes this

Suggest an answer

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

Atlassian Community Events