commit message from python script
This commit is contained in:
15
jenkins/use_jenkins_api.py
Normal file
15
jenkins/use_jenkins_api.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import jenkins
|
||||
jenkins_client = jenkins.Jenkins('https://man-dan-03:9443', username='JonnyBravo', password='113c3449636622439627ab1d51454fc07c')
|
||||
# Get all builds
|
||||
all_jobs = jenkins_client.get_all_jobs()
|
||||
|
||||
# Show Job Infos
|
||||
job_info = jenkins_client.get_job_info(name='test_4')
|
||||
print(job_info)
|
||||
|
||||
# Show Job Name
|
||||
for job_line in all_jobs:
|
||||
print(job_line['name'])
|
||||
|
||||
# start Job
|
||||
job_start = jenkins_client.build_job(name='test_4', parameters={'test' : 'test_python'})
|
||||
Reference in New Issue
Block a user