enthuguy
asked on
Execute hudson/jenkins job using script multiple times
Hi experts,
How to execute hudson/jenkins job using script (is groovy an option) multiple times. plan is to execute same job with different parameters multiple times.
Some Groovy sample scripts
https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
http://wiki.hudson-ci.org/display/HUDSON/Hudson+Script+Console
https://gist.github.com/dnozay/e7afcf7a7dd8f73a4e05
http://pghalliday.com/jenkins/groovy/sonar/chef/configuration/management/2014/09/21/some-useful-jenkins-groovy-scripts.html
http://groovy-lang.org/404.html
Thanks in advance
How to execute hudson/jenkins job using script (is groovy an option) multiple times. plan is to execute same job with different parameters multiple times.
Some Groovy sample scripts
https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
http://wiki.hudson-ci.org/display/HUDSON/Hudson+Script+Console
https://gist.github.com/dnozay/e7afcf7a7dd8f73a4e05
http://pghalliday.com/jenkins/groovy/sonar/chef/configuration/management/2014/09/21/some-useful-jenkins-groovy-scripts.html
http://groovy-lang.org/404.html
Thanks in advance
ASKER
sorry, we are using jenkins, So would like to find a way
thanks
thanks
I know you are using Jenkins... and the way definitely exists in Jenkins.
You may use Windows batch, PowerShell, any other EXE written is any language, probably Groovy etc.
But I still don't know what parameters would you like to change and what multiplicity is used. Are you able to install Jenkins plugins? What operating system do you use?
You may use Windows batch, PowerShell, any other EXE written is any language, probably Groovy etc.
But I still don't know what parameters would you like to change and what multiplicity is used. Are you able to install Jenkins plugins? What operating system do you use?
ASKER
Thanks,
yes, we can install plugin and we are on Linux
yes, we can install plugin and we are on Linux
So Linux... That means you cannot define DOS/Windows batches and PowerShell scripts... Microsoft released some PowerShell DSC for Linux but I am not sure whether it is usable under Linux Jenkins or not. Linux has its own equivalents like shell scripts etc. and it seems Groovy is OK for this task.
Start with a simple script and extend it later.
Another option is to overview the list of Jenkins plugins and check whether some of them fits to your needs.
Start with a simple script and extend it later.
Another option is to overview the list of Jenkins plugins and check whether some of them fits to your needs.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
worked
No need to post links describing Jenkins but please rather define what means "to execute a script with different parameters multiple times". What parameters, what multiplicity?
Jenkins allows to define several job triggers and these jobs can consist of various tasks like DOS/Windows batch, PowerShell script, any EXE etc. etc. All these tasks can read parameters from several places like disk files, OS environment variables, Subversion, Git etc.
You don't need Groovy to execute some job multiple times. You may simply write a DOS batch having a loop inside and/or reading parameters from a file. PowerShell script is better to achieve your goals because it is powerfull language which can do almost everything you need on your PC.
PowerShell is installed on each Windows PC.
BTW, do you really need Jenkins? Windows scheduler could do the same job for you.
Of course, as you did not disclose your OS environment above answer is expecting Windows... Nothing against Groovy :-)