Runs a command, and sends its output to a Jenkins external job.
Project description
jenkins-external
jenkins-external
is a Python script that spawns a command, records
its output and exit code, and then logs this information to Jenkins
in an external job.
Currently, SSH is the only supported method to send output to Jenkins. Therefore, you must go to Configure Global Security → SSH Server, and enable the SSH server on a fixed port.
Installation
pip install jenkins-external
Usage
usage: jenkins-external [-h] [-d DISPLAY_NAME] [-s SSH_COMMAND]
[-x EXECUTABLE] [-q]
host port job command [args [args ...]]
Runs a command, and passes its output to Jenkins as an external job.
positional arguments:
host Jenkins hostname (for Jenkins SSH server)
port Jenkins SSH server port
job Jenkins job name
command command to be run under this script
args arguments to pass to the command
optional arguments:
-h, --help show this help message and exit
-u USER, --user USER Jenkins user to login as (using public key
authentication, default: your username)
-d DISPLAY_NAME, --display-name DISPLAY_NAME
display name of the build
-s SSH_COMMAND, --ssh-command SSH_COMMAND
ssh command
-x EXECUTABLE, --executable EXECUTABLE
the executable to actually use
-q, --no-job-id do not print the job ID in the end
Example
# Sends 'Hello, World!' to a job called `my-job` on a Jenkins instance
# running on `jenkins.example.com`, whose SSH port is 12345.
jenkins-external jenkins.example.com 12345 my-job echo 'Hello, World!'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jenkins-external-0.2.tar.gz
(3.9 kB
view details)
Built Distribution
File details
Details for the file jenkins-external-0.2.tar.gz
.
File metadata
- Download URL: jenkins-external-0.2.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1136fc89aac813b0b3fcdb7bdcd1bfa1252072586016f24f8979aadeb4e430a5 |
|
MD5 | 130bcc25af7376b156e1fa995b3af122 |
|
BLAKE2b-256 | ae551f64c63f9deee206f6a6dba329fd0f6561eb526585e54ca5e4ec1716ad01 |
File details
Details for the file jenkins_external-0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: jenkins_external-0.2-py2.py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8520f094abaa0b9d515bbb5ecbeed37680c3ed8b15aca74b42f3e284d24684aa |
|
MD5 | acecb0b47497b12b11bee52f1296be8c |
|
BLAKE2b-256 | bd6d590f618c72944f7efd49f0940d88ca8a87af9551ceeeeb5573ac4e99f5ea |