我在jenkins 2.x上并使用管道.
I am on jenkins 2.x and using pipeline.
我已将作业配置为使用param构建,并具有字符串param:
I have configured the job to be built with param and have a string param :
我还从github(从脚本管道)获取Jenkinsfile:
I also get the Jenkinsfile from github ( pipeline from script) :
现在在我的Jenkinsfile中,我正在使用参数:$ {githubUrl}并抛出错误:
Now in my Jenkinsfile, I am using the param : ${githubUrl} and it throws error :
stdout:stderr:致命:'$ {githubUrl}'似乎不是git 仓库
stdout: stderr: fatal: '${githubUrl}' does not appear to be a git repository
因此,如果直接编写管道脚本,则可以,但是从scm提取失败.有什么想法如何解决它吗?
So if directly write the pipeline script , this works but fetching from scm fails. Any ideas how to get around it ?
推荐答案使用url: githubUrl,不带美元符号和括号.这是Groovy脚本,而不是Shell脚本
Use url: githubUrl without dollar sign and curve brackets. It's Groovy script, not shell script
更多推荐
从管道中的scm将'带有参数的构建'传递给Jenkinsfile
发布评论