While using jenkins API, getting a failure on reconfig_job
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python Jenkins |
New
|
Undecided
|
Unassigned |
Bug Description
I am using jenkins rest API to recurse through jobs and then reconfigure this one. All methods work except one. He's is my code :
def get_server_
jenkins_url = 'xxxx'
#server = Jenkins(
# Connect to instance - username and password are optional
server = jenkins.
return server
def get_job_details():
# Refer Example #1 for definition of function 'get_server_
server = get_server_
for job in server.
if job == "GithubMigration":
if server.
It gets my configuration.xml, find the job as well but fails on server.
when obviously this functions exists in the jenkins rest API and yes I'm importing jenkins, from jenkinsapi.jenkins import Jenkins .
Edit 1 - I uninstalled Jenkinsapi and have only python-jenkins module and now it fails even before saying
AttributeError: 'module' object has no attribute 'Jenkins' for line : AttributeError: 'module' object has no attribute 'Jenkins'
Any ideas?
Could you please provide python-jenkins version and the version of Jenkins?