我是 Jenkins 新手,我想使用节点执行命令,但出现以下错误: java.io.IOException:批处理脚本只能在 Windows 节点上运行。
我的节点是:
node ('master') {
git 'https://github.com/bryaneibon/SeleniumWithCucucumber.git'
bat label: '', script: 'mvn verify'
}
Run Code Online (Sandbox Code Playgroud)
当我删除 bash 命令时,一切正常。
通过尝试使用命令:
node ('master') {
git 'https://github.com/bryaneibon/SeleniumWithCucucumber.git'
bat 'mvn verify'
}
Run Code Online (Sandbox Code Playgroud)
我有完全相同的错误。
精简日志如下:
No credentials specified
> /usr/local/bin/git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> /usr/local/bin/git config remote.origin.url https://github.com/bryaneibon/SeleniumWithCucucumber.git
# timeout=10
Fetching upstream changes from https://github.com/bryaneibon/SeleniumWithCucucumber.git
> /usr/local/bin/git --version # timeout=10
> /usr/local/bin/git fetch --tags --force --progress --
.
.
.
[Pipeline] bat
[Pipeline] …Run Code Online (Sandbox Code Playgroud)