gpt4 book ai didi

使用参数启动 Jenkins 的 cURL 帖子不起作用

转载 作者:行者123 更新时间:2023-12-01 15:14:26 25 4
gpt4 key购买 nike

我有以下命令来启动带有参数的 Jenkins 作业,根据这个:https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Build .但是,pkgId 的值在 Jenkins 作业中不可见。

D:\Jirong\Jenkins>curl -X Post "http://localhost:8000/job/Test/job/Test_
Parametized/buildWithParameters?token=5e4ca21c566fe4ac5cf8dfe3ba55be8c&pkgId=123
4413225"

最佳答案

您需要将身份验证 token 放在 HTTP 发布请求的 header 中...

试试这样:

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"

关于使用参数启动 Jenkins 的 cURL 帖子不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40728672/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com