Forums

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

knowing the pipeline name at runtime

Guy Mograbi
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 1, 2018

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? 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events