def mkparser(cls):
parser = optparse.OptionParser()
DEFAULT_BASEURL = os.environ.get("JENKINS_URL", "http://localhost/jenkins")
- parser.help_text = "Execute a number of jenkins jobs on the server of your choice. Optionally block until the jobs are complete."
+ parser.help_text = "Execute a number of jenkins jobs on the server of your choice." + \
+ " Optionally block until the jobs are complete."
parser.add_option("-J", "--jenkinsbase", dest="baseurl",
help="Base URL for the Jenkins server, default is %s" % DEFAULT_BASEURL,
type="str", default=DEFAULT_BASEURL)
from jenkinsapi.jenkinsbase import JenkinsBase
from jenkinsapi.queue import QueueItem
from jenkinsapi.mutable_jenkins_thing import MutableJenkinsThing
-from jenkinsapi.exceptions import NoBuildData, NotConfiguredSCM, NotFound, NotInQueue, NotSupportSCM, WillNotBuild, UnknownQueueItem
+from jenkinsapi.exceptions import (
+ NoBuildData,
+ NotConfiguredSCM,
+ NotFound,
+ NotInQueue,
+ NotSupportSCM,
+ WillNotBuild,
+ UnknownQueueItem,
+)
log = logging.getLogger(__name__)
to_json_structure = Job._mk_json_from_build_parameters(build_params)
return json.dumps(to_json_structure)
- def invoke(self, securitytoken=None, block=False, skip_if_running=False, invoke_pre_check_delay=3, invoke_block_delay=15, build_params=None, cause=None):
+ def invoke(self, securitytoken=None, block=False, skip_if_running=False, invoke_pre_check_delay=3,
+ invoke_block_delay=15, build_params=None, cause=None):
assert isinstance(invoke_pre_check_delay, (int, float))
assert isinstance(invoke_block_delay, (int, float))
assert isinstance(block, bool)
class Requester(object):
"""
- A class which carries out HTTP requests. You can replace this class with one of your own implementation if you require
- some other way to access Jenkins.
+ A class which carries out HTTP requests. You can replace this class with one of your
+ own implementation if you require some other way to access Jenkins.
This default class can handle simple authentication only.
"""