Execute hudson/jenkins job using script multiple times

enthuguyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pcelbaCommented:
Jenkins is so variable tool and it also has so many plugins that you can do each job in many possible ways...

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 :-)
0
enthuguyAuthor Commented:
sorry, we are using jenkins, So would like to find a way

thanks
0
pcelbaCommented:
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?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

enthuguyAuthor Commented:
Thanks,
yes, we can install plugin and we are on Linux
0
pcelbaCommented:
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.
0
enthuguyAuthor Commented:
Thx
got it working

used curl by passing --user
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
enthuguyAuthor Commented:
worked
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.