curl -v -X POST {JENKINS_INDEX}/createItem?name={JOB_NAME} --data-binary "@/path/to/config.xml" -H "Content-Type: text/xml" --user {USER_NAME}:{PASSWORD}
示例:
curl -v -X POST http://localhost:8080/createItem?name=testProject --data-binary "@/home/leleliu008/config.xml" -H "Content-Type: text/xml" --user liufupin:123456
curl -v -X POST {JENKINS_INDEX}/job/{JOB_NAME}/enable --user {USER_NAME}:{PASSWORD}
示例:
curl -v -X POST http://localhost:8080/job/testProject/enable --user liufupin:123456
curl -v -X POST {JENKINS_INDEX}/job/{JOB_NAME}/disable --user {USER_NAME}:{PASSWORD}
示例:
curl -v -X POST http://localhost:8080/job/testProject/disable --user liufupin:123456
curl -v -X POST {JENKINS_INDEX}/job/{JOB_NAME}/doDelete --user {USER_NAME}:{PASSWORD}
示例:
curl -v -X POST http://localhost:8080/job/testProject/doDelete --user liufupin:123456
curl -v -X POST {JENKINS_INDEX}/job/{JOB_NAME}/build --user {USER_NAME}:{PASSWORD}
示例:
curl -v -X POST http://localhost:8080/job/testProject/doDelete --user liufupin:123456
curl -v -X POST {JENKINS_INDEX}/job/{JOB_NAME}/polling --user {USER_NAME}:{PASSWORD}
示例:
curl -v -X POST http://localhost:8080/job/testProject/polling --user liufupin:123456
curl -v -X GET {JENKINS_INDEX}/job/{JOB_NAME}/description --user {USER_NAME}:{PASSWORD}
示例:
curl -v -X GET http://localhost:8080/job/testProject/description --user liufupin:123456
curl -v -X POST {JENKINS_INDEX}/job/{JOB_NAME}/description description={DESCRIPTION} --user {USER_NAME}:{PASSWORD}
示例:
curl -v -X POST http://localhost:8080/job/testProject/description description=我是更新后的描述 --user liufupin:123456
curl -v -X GET {JENKINS_INDEX}/job/{JOB_NAME}/config.xml --user {USER_NAME}:{PASSWORD}
示例:
curl -v -X GET http://localhost:8080/job/testProject/config.xml --user liufupin:123456
curl -v -X POST {JENKINS_INDEX}/job/{JOB_NAME}/config.xml --data-binary "@/path/to/config.xml" -H "Content-Type: text/xml" --user {USER_NAME}:{PASSWORD}
示例:
curl -v -X POST http://localhost:8080/job/testProject/config.xml --data-binary "@/home/leleliu008/config.xml" -H "Content-Type: text/xml" --user liufupin:123456