0
votes

Im trying to use Jenkins to trigger a windows batch command on a slave server. I can't seem to get it to work , the following are the steps that I have done.

  1. Added a simple echo command to a log file and verified it worked on the server itself.
  2. using the multiproject configuration which targets my slave server only.
  3. when I select build it completes fine and the console responds with

Started by user anonymous Building remotely on Stg Server Slave in workspace C:\ Finished: SUCCESS

however I don't see any results from the batch command that I entered.

If I update the project to do a subversion checkout it works fine and I see the code updated on my slave. It still won't run the build batch command.

1
I assume you are trying to 'Execute Windows batch command' in your build step. Can you please post the command you are trying to execute? - Vikram
echo test jenkins >>log.txt - rocketdoctor
I actually got it to work by using the free-style software project and using the restrict option to limit it to the slave server. Don't understand why it won't work in the multi-configuration project - rocketdoctor

1 Answers

0
votes

Multi-configuration projects are fundamentally different from other project types (which is why the first thing choose when making a new project is choose if it is a Free-style or Multi-configration project.)

For this project type you specify axes with values on each axis. Axes can be variables that get different values. But one axes type is where to run the build. You can have build slaves that have labels like "mac", "windows" and "linux" and you can specify an axis with these slave labels. Jenkins will then execute the build once on a slave labeled "mac", once on "windows" and once on "linux".