0

I have 2 Jenkins pipelines, lets call them Pipeline-A and Pipeline-B. Pipeline-A is parent pipeline which invokes Pipeline-B (child) when it (Pipeline-A) is running.

How can i know the name of Pipeline-A (parent) when Pipeline-B (child) is running. Is there any environment variable that i can invoke to know this?

This is important to know because there are many pipelines similar to Pipeline-A which invoke Pipeline-B.

One can refer my answer on how to invoke pipelines at following link: How to invoke a jenkins pipeline A in another jenkins pipeline B

Yash
  • 2,944
  • 7
  • 25
  • 43
  • How about passing the name as string parameter to the child? – Joerg S Jul 20 '18 at 08:37
  • Yes @JoergS, that can be done but it will introduce a new parameter. I want to know if there exists an environment variable which does the this job. – Yash Jul 20 '18 at 18:24

0 Answers0