Skywolf
Skywolf

Reputation: 703

Jenkins: executing windows cmd which call other cmd?

In my Jenkins job I would like to execute a windows cmd which is synced from source depot during build, and this cmd will call other cmds synced from source depot too. The cmd runs with error due to unable to find the other cmds with relative path. It looks like the root cause is I cannot set start location for the initial cmd in Jenkins job configuration, which is not workspace root in my case. Any ideas?

B.R.

Upvotes: 1

Views: 3109

Answers (1)

Mikhail
Mikhail

Reputation: 4223

Try cd to appropriate directory first:

cd %WORKSPACE% && <your command>

This is Hudson Environment Variables, should be for Jenkins the same.

Upvotes: 4

Related Questions