python写一个功能:禁用jenkins中某一个job任务
import requests#python写一个功能:禁用jenkins某一个任务(job)
print(requests.get('http://localhost:8080/jenkins/job/Test_version/').text)
url = 'http://localhost:8080/jenkins/job/Test_version/disable'
re = requests.post(url, data={}, auth=('wyq', 'wyq'))
print(re.status_code)
print(re.headers)
print(re.reason)
执行成功并在jenkins下查看Test_version任务已被成功禁用:
python写一个功能:禁用jenkins中某一个job任务
import requests#python写一个功能:禁用jenkins某一个任务(job)
print(requests.get('http://localhost:8080/jenkins/job/Test_version/').text)
url = 'http://localhost:8080/jenkins/job/Test_version/disable'
re = requests.post(url, data={}, auth=('wyq', 'wyq'))
print(re.status_code)
print(re.headers)
print(re.reason)
执行成功并在jenkins下查看Test_version任务已被成功禁用:
发布评论