-
Bug
-
Resolution: Not A Defect
-
Major
-
None
-
Jenkins 2.34
Pipeline 2.4
Our Jenkins is using OSX, while our slave is running Windows. When I try to run a pipeline script that runs on the Windows slave, I get an error while trying to execute the bat step. It looks like master is trying to run the command (and failing) when it should run fine in a Windows environment.
Pipeline code
node('windowsSlave') { def nodeWorkspace = pwd() + "@script" def baseGatlingDir = "${nodeWorkspace}\\Gatling_Tests" def gatlingTargetDir = "${baseGatlingDir}\\target" stage('Clear Previous Test Results') { dir("${gatlingTargetDir}") { deleteDir() } } stage('Maven Compile') { dir("${baseGatlingDir}") { bat "mvn test-compile" } }
Console output
[Pipeline] node
Running on windowsSlave in C:\Jenkins\workspace\Gatling\Pipeline - Acceptance Simulation
[Pipeline] {
[Pipeline] pwd
[Pipeline] stage
[Pipeline] { (Clear Previous Test Results)
[Pipeline] dir
Running in C:\Jenkins\workspace\Gatling\Pipeline - Acceptance Simulation@script\Gatling_Tests\target
[Pipeline] {
[Pipeline] deleteDir
[Pipeline] }
[Pipeline] // dir
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Maven Compile)
[Pipeline] dir
Running in C:\Jenkins\workspace\Gatling\Pipeline - Acceptance Simulation@script\Gatling_Tests
[Pipeline] {
[Pipeline] bat
[Gatling_Tests] Running batch script
'cmd' is not recognized as an internal or external command,
operable program or batch file.
- is related to
-
JENKINS-40338 Linux Master and Windows Slave ends up with unusable PATH
-
- Closed
-