I am trying to use yaml's extend feature to write a generic pipeline.
I want to know inside the script which pipeline I am running.
So for example:
pipelines:
generic_pipeline: &generic_pipeline
- step:
- echo "running pipeline ${PIPELINE}"
awesome_pipeline:
<<: *generic_pipeline
when running awesome_pipeline I will get an echo for "awesome_pipeline"
Using this as reference: https://confluence.atlassian.com/bitbucket/environment-variables-794502608.html I can't seem to find any way to know which pipeline I am currently on.
Could it be that using branch name is enough?
I know I can trigger/schedule any pipeline on any branch - would that result in the outcome I am looking for?