Trigger parameterized build with curl and crumb

前端 未结 7 877

I\'ve seen similar posts to this on SO, but not quite exactly what I am trying to do (or at least no full examples of a command to run).

I am trying to remotely trig

7条回答
  •  孤街浪徒
    2020-12-03 01:36

    None of the previous answers worked for me, but mixing some flags i got it working:

    JKSERVER="http://localhost:8080"
    JKUSER="jenkins_user"
    JKPASSWORD="jenkins_password"
    JKCRUMB=`wget -q --auth-no-challenge --user $JKUSER --password $JKPASSWORD --output-    document - '$JKSERVER/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)'`
    
    curl --user $JKUSER:$JKPASSWORD -I -X POST "$JKSERVER/job/master/build" -H "$JKcrumb"
    

提交回复
热议问题