jenkins email server;
sudo pip install python-jenkins
http://python-jenkins.readthedocs.io/en/latest/api.html
import jenkins
jenkins_server_url=‘http://129.0.1.220:8080/jenkins‘
server=jenkins.Jenkins(jenkins_server_url, username=user_id,
password=api_token)
user_id=‘liulq‘
api_token =‘63e55d99366021e726948d8db54ba7999‘
jobInfo = server.get_job_info("ShuiSL")
print jobInfo[‘property‘]
buildInfo = server.get_build_info("UexerciseMVN--TestEnv",153)
print buildInfo[‘changeSet‘]
print buildInfo[‘changeSet‘][‘items‘][21][‘comment‘]
for item in buildInfo[‘changeSet‘][‘items‘]:
print item["comment"]
GIT_COMMIT ,
GIT_BRANCH,
GIT_PREVIOUS_COMMIT,
时间: 2024-10-07 14:54:38