How to disable a Jenkins job via curl?

前端 未结 5 1787
感动是毒
感动是毒 2020-12-10 02:24

I want to disable a Jenkins job by sending a post curl request to Jenkins.

I\'ve tried doing that using:

  1. curl -X POST http://:8080
5条回答
  •  被撕碎了的回忆
    2020-12-10 03:06

    I found the first part of kenorb's solution worked for me, i.e. getting the crumb, but for the second part, curl did not like that syntax, it said:

    curl: (6) Couldn't resolve host 'http:'

    So I had to use the following syntax which worked:

    curl -H $CRUMB http://localhost:8080//disable -u USER:TOKEN

提交回复
热议问题