jenkinsapi.utils package¶
Submodules¶
jenkinsapi.utils.crumb_requester module¶
jenkinsapi.utils.jenkins_launcher module¶
- class jenkinsapi.utils.jenkins_launcher.JenkinsLancher(local_orig_dir, systests_dir, war_name, plugin_urls=None, jenkins_url=None)[source]¶
Bases:
object
Launch jenkins
- JENKINS_LTS_WAR_URL = 'https://updates.jenkins.io/stable/latest/jenkins.war'¶
- JENKINS_WEEKLY_WAR_URL = 'http://updates.jenkins.io/latest/jenkins.war'¶
- class jenkinsapi.utils.jenkins_launcher.StreamThread(name, q, stream, fn_log)[source]¶
Bases:
Thread
- run()[source]¶
Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
jenkinsapi.utils.jsonp_to_json module¶
Module for converting jsonp to json.
jenkinsapi.utils.krb_requester module¶
Kerberos aware Requester
jenkinsapi.utils.manifest module¶
This module enables Manifest file parsing. Copied from https://chromium.googlesource.com/external/googleappengine/python/+/master /google/appengine/tools/jarfile.py
- exception jenkinsapi.utils.manifest.InvalidJarError[source]¶
Bases:
Exception
InvalidJar exception class
- class jenkinsapi.utils.manifest.Manifest(main_section, sections)[source]¶
Bases:
object
The parsed manifest from a jar file. Attributes:
- main_section: a dict representing the main (first)
section of the manifest. Each key is a string that is an attribute, such as ‘Manifest-Version’, and the corresponding value is a string that is the value of the attribute, such as ‘1.0’.
- sections: a dict representing the other sections of the manifest.
Each key is a string that is the value of the ‘Name’ attribute for the section, and the corresponding value is a dict like the main_section one, for the other attributes.
- jenkinsapi.utils.manifest.read_manifest(jar_file_name)[source]¶
Read and parse the manifest out of the given jar. Args:
jar_file_name: the name of the jar from which the manifest is to be read.
- Returns:
A parsed Manifest object, or None if the jar has no manifest.
- Raises:
IOError: if the jar does not exist or cannot be read.
jenkinsapi.utils.requester module¶
Module for jenkinsapi requester (which is a wrapper around python-requests)
- class jenkinsapi.utils.requester.Requester(*args, **kwargs)[source]¶
Bases:
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.
This default class can handle simple authentication only.
- AUTH_COOKIE = None¶
- VALID_STATUS_CODES = [200]¶
- post_and_confirm_status(url, params=None, data=None, files=None, headers=None, valid=None, allow_redirects=True)[source]¶
jenkinsapi.utils.simple_post_logger module¶
Module contents¶
Module __init__ for utils