我有一个Jenkins Pipeline plugin脚本,如下所示:
[Pipeline] stage
[Pipeline] { (check out project)
[Pipeline] echo
test 1
[Pipeline] echo
test 2
[Pipeline] echo
test 3
[Pipeline] }
[Pipeline] // stage
[Pipeline] End of Pipeline
Finished: SUCCESS
构建的输出是:
io.on('login', function(req){
client.emit('response event', { some: 'data' });
从输出和构建时间判断,只执行echo命令。所有其他人都被忽略了似乎没有错误发生。
如何才能执行所有命令?
答案 0 :(得分:1)
您的脚本成功运行并在
之后按预期工作node{ }
和sh
shell
intead
醇>
像这样:
node{
stage("check out project") {
sh "pwd"
echo "test 1"
git credentialsId: '12341234-1234-1234-1234-123412341234', url: "git@github.com:sendgrid/sendgrid-java.git"
echo "test 2"
sh "git --version"
echo "test 3"
}
}