Jenkins Remote Trigger Not Working

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

    This works for me:

    tokenuser = You need login with the user and check token config jenkins -> admin users

    user = username

    curl -XPOST --silent --show-error --user user:tokenuser "http://ipserver/jenkins/buildByToken/build?job=JOBNAME&token=7RJWiIwD5cW3S6QjwF7a"
    

    Example:

    curl -XPOST --silent --show-error --user desarrollador:b9611288e4159ea9fb7857faeadd06fe "http://ipserver/jenkins/buildByToken/build?job=DeployGF&token=7RJWiIwD5cW3S6QjwF7a"
    

提交回复
热议问题