0

I would like to be able to pass parameters from one job to another.

The problem is I am currently using promotions in Jenkins in order to create a manual approval phase between my build and deployment. I am doing this by having my build in one job and post-build in another. I have used the promoted builds plugin for this.

I understand the one way to pass parameters is using the Parameterized Trigger Plugin but the problem is I am not able to use it along with promotions.

I have referred to this answer but unable to get the output- How to promote a specific build number from another job in Jenkins?

MFerguson
  • 1,739
  • 9
  • 17
  • 30
Brian
  • 23
  • 4

1 Answers1

0

I would recommend you to use pipeline with the step input to validate approval. https://jenkins.io/doc/pipeline/steps/pipeline-input-step/

If you need to factorize/reuse jobs, create a shared library or sh scripts that you version. It is hell to maintain and analyse jobs that call other jobs. Jenkins library are easy to create, basically new steps are in folder ./vars/ there are plenty of examples on github. For instance https://github.com/SAP/jenkins-pipelayer/

fredericrous
  • 2,833
  • 1
  • 25
  • 26