How can i update a jenkins job using the api

前端 未结 6 513
青春惊慌失措
青春惊慌失措 2020-12-24 07:47

I have to create/update a jenkins job using its api because all of my jobs are using parameters which are also used by other scripts and I am trying to centralize the script

6条回答
  •  甜味超标
    2020-12-24 08:27

    You can also POST an updated config.xml to the URL which can fetch config.xml, to programmatically update the configuration of a job.

    The fetch url pattern: $JENKINS_SERVER/job/$JOB_NAME/config.xml

    detailed doc pattern: $JENKINS_SERVER/job/$JOB_NAME/api

    example: https://ci.jenkins-ci.org/job/infra_atlassian-base/api/

提交回复
热议问题