我有一个非常简单的Groovy脚本,我目前正在尝试仅运行任何Jenkins管道。我在Windows上,因此我已经不得不解决Jenkins找不到任何sh和nohup exe的问题(安装了git bash,因为它显然不想与我的cygwin安装一起使用)。
现在我只想运行它(因为我想在那之后建立一个Maven项目):
import { useFetch } from '../hooks/fetch';
const res = useFetch('http://api.domain.com', '', 'GET', '')
console.log(res);
输出只是不断的:
pipeline {
agent { docker { image 'maven:3.3.3' } }
stages {
stage('build') {
steps {
echo "justpleaseworkffs"
}
}
}
}
以上是所有不显示任何错误的git脚本,因此我认为这与相关性无关。
也许我想念它,但是我没有看到任何错误消息,我知道存在类似的问题,但是每个问题至少都有一行指定错误。
退出代码126仅表示找到/识别了该命令,但该命令不可执行,这可能意味着权限问题(詹金斯通常会输出错误消息),或者我所知道的其他任何内容。
我已经安装了docker,但是无论如何,我相信Jenkins具有内置的docker支持。
请注意,此脚本可以按预期工作:
Commit message: ",kza,kl"
> git.exe rev-list --no-walk 12b40abc0cfaa044de24b19216ffb2457c98df49 # timeout=10
[Pipeline] }
[Pipeline] // stage
[Pipeline] withEnv
[Pipeline] {
[Pipeline] sh
sh: C:\Program Files\Git\usr\bin: Is a directory
[Pipeline] sh
sh: C:\Program Files\Git\usr\bin: Is a directory
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 126
Finished: FAILURE
编辑:按预期工作,表示输出:
pipeline {
agent none
stages {
stage('build') {
steps {
echo "justpleaseworkffs"
}
}
}
}
提前谢谢大家