I have several tags in git that should trigger the same bitbucket pipeline. There is no common pattern for these tags. So I need something like this:
tags:
one,two,three:
- step:
name: "deploy"
services:
- docker
script:
...
For tags 'one', 'two' or 'three' I need to run this pipeline, but not for other tags.
How can I achieve this?
Thanks!
Hello @Michael_Gustus ,
Welcome to the Community!
Each item under tags declares only one tag. You need to make use of YAML anchors and aliases to reuse common parts of your configuration. In your case the configuration would look something like this:
tags:
one: &tag-build
- step:
name: "deploy"
services:
- docker
script:
...
two: *tag-build
three: *tag-build
Hope this helps. Let me know if you have any questions.
Cheers,
Daniil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.