我有以下命令用参数启动Jenkins作业:https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Build。但是,在Jenkins作业中看不到pkgId的值。
D:\Jirong\Jenkins>curl -X Post "http://localhost:8000/job/Test/job/Test_
Parametized/buildWithParameters?token=5e4ca21c566fe4ac5cf8dfe3ba55be8c&pkgId=123
4413225"
答案 0 :(得分:0)
您需要将身份验证令牌放在HTTP post请求的标头中...
试试这样:
curl -H "Authorization: Basic <replace_auth_token_here>" -X POST "http://localhost:8000/job/Test/job/Test_
Parametized/buildWithParameters?YOUR_JOB_PARAM_NAME=YOUR_JOB_PARAM_VALUE"