Passing 'build with parameters' to Jenkinsfile from scm in pipeline

喜欢而已 提交于 2020-01-04 03:17:24

问题


I am on jenkins 2.x and using pipeline.

I have configured the job to be built with param and have a string param :

I also get the Jenkinsfile from github ( pipeline from script) :

Now in my Jenkinsfile, I am using the param : ${githubUrl} and it throws error :

stdout: stderr: fatal: '${githubUrl}' does not appear to be a git repository

So if directly write the pipeline script , this works but fetching from scm fails. Any ideas how to get around it ?


回答1:


Use url: githubUrl without dollar sign and curve brackets. It's Groovy script, not shell script



来源:https://stackoverflow.com/questions/39254262/passing-build-with-parameters-to-jenkinsfile-from-scm-in-pipeline

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!