Forums

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

Shared pipelines with branches/tags/pull-requests

Robert Koch
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!
October 3, 2024

We got a pipeline that varies on branches, tags and pull-requests. Now we want to share the default pipeline code via the "import-pipeline" feature.

 

pipelines:
branches:
import-pipeline:
import: shared-pipeline:master:common-branches
tags:
import-pipeline:
import: shared-pipeline:master:common-tags
pull-requests:
'**':
import: shared-pipeline:master:common-pull-request

This does not seem to work. Is it possible to share on this level? The examples don't use the categories

1 answer

1 vote
Robert Koch
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!
October 4, 2024

I realized that "import-pipeline" is not any directive - should have read the documentation in more details. I got it to work with:

pipelines:
branches:
release:
import: shared-pipeline:master:common-branches-release
master:
import: shared-pipeline:master:common-branches-master
tags:
'**':
import: shared-pipeline:master:common-tags
pull-requests:
'**':
import: shared-pipeline:master:common-pull-requests
default:
import: shared-pipeline:master:common-default

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