I am having a Jenkins build setup, where I use 2 PlasticSCM repositories. I am able to get the info through the environment variables for 1 repository, but is there a way to get information from the other repository also?
I am basically ticking the use multiple workspaces option.
In a Jenkins job, when you use multiple workspaces, each workspace is associated with a different SCM repository. Jenkins provides environment variables for the SCM repository that triggered the build, but it doesn’t provide environment variables for other SCM repositories used in the job.
However, I think you could use Jenkins Pipeline’s checkout step to manually checkout code from the other repository and then extract the information you need.
Here, checkout is used to checkout code from two different Git repositories. The checkout step returns a map of SCM-related variables, which you should be able to use in your pipeline.