Jenkins Remote Trigger Not Working

前端 未结 9 729
自闭症患者
自闭症患者 2021-02-03 22:54

I am getting the following error when i try triggering a build using the following command:

curl http://jenkins_server:port/jenkins/job/job_name/build?token=token_name

9条回答
  •  野的像风
    2021-02-03 23:23

    I think there's no need to set up any kind of plugin to make it works, simply do this BATCH CMD:

    curl -X POST http://USER_ID_JENKINS_RECEIVER:TOKEN_OF_USER_ID_JENKINS_RECEIVER@URL_JENKINS_RECEIVER:PORT/job/NAME_OF_JOB/buildWithParameters?token=TOKEN_JOB_JENKINS_RECEIVER
    
    • To see you USER_ID_TOKEN, go to your username at the top-right of jenkins > go to Configure > Click on API Token and it will be displayed.

    • You must configure a token on the JOB_OF_JENKINS_RECEIVER

    I have to say that it works perfectly on Jenkins without any kind of permissions to anonymous users.

提交回复
热议问题