Jenkins Remote Trigger Not Working

前端 未结 9 726
自闭症患者
自闭症患者 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:29

    I install Build Token Root Plugin to solve this issue before

    https://wiki.jenkins-ci.org/display/JENKINS/Build+Token+Root+Plugin

    Then as the same, setup Authentication Token

    Finally, either use curl to trigger remote build (Be careful the escape character "\")

    curl http://JENKINS_URL/buildByToken/build?job=JOB_NAME\&token=TOKEN_NAME

    or paste the URL to your browser (No needs escape character "\")

    http://JENKINS_URL/buildByToken/build?job=JOB_NAME&token=TOKEN_NAME

    If you see Succeed, it means that trigger remote Jenkins successfully.

    Note that, you don't have to setup build, discover, and read rights on Job

    For more information, you could reference to https://cloudbees.zendesk.com/hc/en-us/articles/204338790-Why-are-builds-not-being-triggered-with-Build-Token-Root-Plugin-

提交回复
热议问题