Did anyone get pull request or tag pipelines to work with imported pipelines?
I'm trying to consolidate duplicated logic from many repos into a common pipeline. I have copied the pipeline into a new repository, flattened the hierarchy (each branch in branches: now is a top-level pipeline, and so on) and referenced those pipelines in a test repo.
The specific branches I set up (develop, release, master) are triggering the imported pipeline correctly, but using the same pattern with pull-request or tags does not trigger. Is this an expected limitation?
So the referencing bitbucket-pipelines.yml looks like this:
pipelines:
#Upon commits
default:
import: microservice-pipeline-templates:master:default
branches:
develop:
import: microservice-pipeline-templates:master:develop-branch
release/*:
import: microservice-pipeline-templates:master:release-branch
hotfix/*:
import: microservice-pipeline-templates:master:hotfix-branch
master:
import: microservice-pipeline-templates:master:master-branch
#Upon pull requests
pull-requests:
default:
import: microservice-pipeline-templates:master:default-pr
release/*:
import: microservice-pipeline-templates:master:release-pr
hotfix/*:
import: microservice-pipeline-templates:master:hotfix-pr
master:
import: microservice-pipeline-templates:master:master-pr
tags:
'QA-*':
import: microservice-pipeline-templates:master:qa-tag
'UAT-*':
import: microservice-pipeline-templates:master:uat-tag
'PROD-*':
import: microservice-pipeline-templates:master:prod-tag
And the imported pipeline looks something like this:
export: true
image: atlassian/default-image:4
clone:
depth: full
definitions:
caches:
sonar: ~/.sonar/cache
maven: ~/.m2/repository
services:
docker:
memory: 512
docker-with-more-memory:
memory: 2048
type: docker
docker-with-large-memory:
memory: 5120
type: docker
steps:
- step: &step1
{...}
- step: &step2
{...}
- step: &step3
{...}
- step: &step4
{...}
- step: &step5
{...}
pipelines:
default:
- step: *step1
develop-branch:
- step: *step1
- step: *step2
- step: *step3
release-branch:
- step: *step1
- step: *step2
- step: *step4
default-pr:
- step: *step1
- step: *step2
release-pr:
- step: *step1
- step: *step4
qa-tag:
- step: *step5
uat-tag:
- step: *step5
prod-tag:
- step: *step5
What am I doing wrong? The documentation only mentions limitations about environment variables, images and individual steps... This is a deal breaker for me, if tags don't work it's unusable.