Skip to main content

Runs a command, and sends its output to a Jenkins external job.

Project description


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.


pip install jenkins-external


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


# Sends 'Hello, World!' to a job called `my-job` on a Jenkins instance
# running on ``, whose SSH port is 12345.
jenkins-external 12345 my-job echo 'Hello, World!'

Project details

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 hashes)

Uploaded Source

Built Distribution

jenkins_external-0.2-py2.py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page