Informatics Matters Jenkins Utilities
The im-jenkins-utils module is a set of utilities employed by Informatics Matters for automated configuration of the Jenkins CI/CD platform. It is a small library that currently simplifies the creation of Jobs, secrets and other actions using python-jenkins and cURL.
It also includes a growing list of convenient wrapper functions to simplify a number of tasks, like checking whether any jobs have failed (or are unstable).
Typical use of the utilities relies on creating an ImJenkinsServer object by providing a suitably formatted URL:
from im_jenkins_server import ImJenkinsServer j_server = ImJenkinsServer(url)
The url value is typically of the form https://<user>:<token>@<url>.
With this object you can then create a global text secret:
if j_server.is_connected():
j_server.set_secret_text('mySecretId', 'The Secret Text')
ImJenkinsServer provides the following methods: -
set_secret_text()
set_secret_file()
set_secret_user()
get_jobs()
set_jobs()
get_views()
set_views()
check_jobs()
Configuration
You can provide configuration in a Python ConfigParser-style file.
At the moment this is used to provide a list of Jenkins Jobs that are excluded during the check_jobs() method. If there are Jobs that can fail, that you’re not interested in, then you can provide their names via a configuration file.
To exclude Jobs Build (Experiment) and Run (Experiment) you can provide their names in the check section using the exclude-job key:
[check]
exclude-job: Build (Experiment)
Run (Experiment)
And then pass the name and path of the configuration file to the server object:
j_server = ImJenkinsServer(url, 'config.ini')
Jobs are assumed to be tolerant of case and the Job names are checked while ignoring the name case.
Metadata
Release files for im-jenkins-utils 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| im_jenkins_utils-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / im_jenkins_utils-1.3.0-py3-none-any.whl
| Download URL | im_jenkins_utils-1.3.0-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5428fa2e3674610f7981820291fe1fcc0170b863637dee057037594d2cca3670
|
|
BLAKE2b-256 checksum How to use checksums |
83c332381beed573222fc50be87e8cb15832f5e8c5b60848748114fea5eb0e75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.6.7
|
Security for im-jenkins-utils 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.