0

Is there a way to change a job configuration in jenkins depending on passed parameters?

I am using Artifact Promotion Plugin to promote artifacts on Nexus. I added a build step to use this plugin and I have to fill in some properties :

  • Artifact Group, Id, Version, Packaging
  • Source Repository URL
  • Username for source repository
  • Password for source repository
  • Target Repository URL
  • Username for target repository
  • Password for target repository

I want to parameterize the username and password for the source and target repository so that each time someone launch the build in Jenkins, he has to put his/her username and password as build parameters

I tried with Parameterized plugin, but it seems that the parameters defined by this plugin can only be accessed by batch and shell scripts and can not be used by other plugins.

(Needless to say, I don't want any password stored in xml files or displayed by console)

Thanks

Mriguel
  • 1
  • 2
  • http://stackoverflow.com/questions/24069350/how-can-you-deploy-a-specific-artifact-from-jenkins-into-nexus check whether it is helpful for you – DevD Mar 30 '15 at 05:30
  • This seems like a "hack" solution that might work in my case if I combine it with the "mask passwords plugin". I'll try it and tell you the result – Mriguel Mar 31 '15 at 19:48
  • yeah.. or else you can redirect only that login command (which contains password)output to null file(dont display it in standard output. it could be a very simple fix – DevD Apr 01 '15 at 03:41
  • ./script.sh > /dev/null 2>&1 for that command then reset back to standard output.. its just a tweak. then you get time to invest on plugins – DevD Apr 01 '15 at 09:34

0 Answers0