I am trying to build rather complex Bitbucket Pipeline while following dry principles.
So far I defined multiple custom steps in definitions section:
definitions:
steps:
- step: &foo
name: foo
script:
...
- step: &bar
name: bar
script:
...
Now, I have two custom pipelines that are almost identical except for one artifact/variable.
pipelines:
custom:
action-a:
- step:
name: action a
script:
- echo "1" > .value
artifacts:
- .value
- step: *bar
- step: *foo
action-b:
- step:
name: action b
script:
- echo "2" > .value
artifacts:
- .value
- step: *bar
- step: *foo
Everything after step generating .value artifact is identical (and way more complex than just 2 steps). Would it be possible to define a single pipeline and somehow inject this artifact with anchors?
