Shruthi Sathyanarayana
Shruthi Sathyanarayana

Reputation: 211

How to add multiple commands in series in "Execute Windows Batch Command" in Jenkins

I have a requirement where I need to run certain commands in series in order to build my project. Can I have give all the commands together in series in Jenkins? How am I supposed to do that. If I give it like as shown below :

enter image description here

How can give the commands so that it will execute one after the other. Please help me.

Upvotes: 4

Views: 11882

Answers (2)

Dinesh Rajan
Dinesh Rajan

Reputation: 2584

You can run a series of commands in windows command prompt using & operator.

So below will work from a single line command

env.bat & ant & forced-db.bat

Upvotes: 10

Bruno Lavit
Bruno Lavit

Reputation: 10382

I think it's better to execute separate build steps, like:

  • Windows batch step: env.bat
  • Ant build step: ant build ...
  • Windows batch step: force-db.bat

Upvotes: 4

Related Questions