Forums

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

How to trigger a pipeline configuration entirely using dynamic pipelines?

Bhrugu Rajput November 20, 2024

I am trying to trigger and define a pipeline type (default, pr, branches, tags, etc.) dynamically, that is this pipeline configuration type doesn't exist in my bitbucket.yml file.  The use case is that I'd like a pipeline to be triggered if a pull-request doesn't exist, and if one does exist I don't want it to be triggered and only want the pr pipeline to be triggered.

I have thought of creating a default pipeline object and definition and assign it to the pipeline configuration object. Alternatively, I have thought of deleting an already present default step if a PR exists so that two pipelines (default and PR) aren't triggered simultaneously. I am in the process of trying out both these ideas. Please let me know if this is the way to go and if there is a better way out there to trigger and define a pipeline configuration entirely dynamically. 

1 answer

1 vote
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 21, 2024

I think you could try calling the Bitbucket REST API, specifically the end-points related to pull request, from the pipeline. That way the pipeline itself could decide if the PR already exists and change his behavior accordingly.

Bhrugu Rajput December 6, 2024

We gave it a try and it didn't work as expected. The Bitbucket API part we had figured out already. I have posted a more in-depth information about the issue in this post: Dynamic Pipeline and Bitbucket API Integration leading to erratic behaviour.

Suggest an answer

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

Atlassian Community Events