【问题标题】:curl Error in Jenkins Pipeline - URL not FoundJenkins 管道中的 curl 错误 - 找不到 URL
【发布时间】:2021-07-23 20:09:40
【问题描述】:

sh '''curl -X POST -H "Content-Type: application/json" -d '{ "name": "'"$GroupName"'", "deletable": "true"}''https ://"${username}":"${password}"@bitbucket.com/rest/api/1.0/admin/groups?name="$GroupName" '''

我用。上面的詹金斯管道。在执行时我收到一个错误 curl:没有指定 URL! curl:尝试“curl --help”或“curl --manual”以获取更多信息

【问题讨论】:

    标签: jenkins curl bitbucket


    【解决方案1】:

    刚刚发现

    这是来自 Jenkins 的 API 调用,用于在 BB 中创建组。

    sh '''curl -X POST -H "Content-Type: application/json" -d ' { "name": "'"$GroupName"'", “可删除”:“真实” }' https://"${username}":"${password}"@bitbucket.com//rest//api//1.0//admin//groups?name=$GroupName''' }

    替换您的 bitbucket 网址。

    【讨论】:

      猜你喜欢
      • 2022-06-16
      • 1970-01-01
      • 2021-09-26
      • 2020-07-04
      • 2020-04-30
      • 1970-01-01
      • 2020-12-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多