Jenkins Pipeline cannot execute SH command file in a Windows slave

后端 未结 2 1345
無奈伤痛
無奈伤痛 2021-01-12 16:25

I\'m executing this code:

node(\'my_windows_slave\') {
   sh \'ls\'
}

In my Windows slave I can properly execute sh command:

2条回答
  •  猫巷女王i
    2021-01-12 16:56

    Use the bat step instead of sh.

    From Jenkins docs:

    Windows-based systems should use the bat step for executing batch commands.

提交回复
热议问题