No description
  • Go 93.6%
  • Shell 6.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-26 23:59:28 +01:00
cmd/jrun go: update dependencies 2024-12-21 20:04:30 +01:00
internal/jenkins new: apache license 2024-07-09 23:49:43 +02:00
go.mod go: update deps 2026-11-26 23:59:28 +01:00
go.sum go: update deps 2026-11-26 23:59:28 +01:00
jenkins.sh add: shell implementation 2023-03-29 13:59:10 +02:00
jrun.conf.example code: mv to cmd/jrun 2023-04-03 19:45:16 +02:00
LICENSE.txt new: apache license 2024-07-09 23:49:43 +02:00
README.md code: mv to cmd/jrun 2023-04-03 19:45:16 +02:00

A simple Jenkins client

Jrun aims to be a simple client for the Jenkins API. It allow to trigger Jenkins builds remotely and returns the Jenkins Console output to the local terminal.

Build and Installation

There are no distributable packages yet. You need a decent Golang installation (I used Go 1.20.2, but 1.16.x and onwards should be fine.)

The short route

Use Golang's install tool directly:

go install go.schlittermann.de/heiko/jrun/cmd/jrun@latest

This installs the binary to the directory pointed to by the GOBIN environment variable. (See go help env.). You may need to set the GONOPROXY environment to go.schlittermann.de in case of rapid development cycles.

The developer route

Clone the Git repo and install it from inside the cloned repo:

go install ./cmd/jrun

The GOBIN environment variable can/should be used here too.

Usage

Jrun uses a configuration file .jrun.conf in your current directory. The example config can be printed using

jrun -example-config

Once you configured it for your needs, you can use

jrun -running-config

to check what Jrun reads from your config.

For available command line options, please refer to the output of

jrun -h

Authentication to the Jenkins server

You need 2 types of authentication credentials.

  • Your username and password (optionally an API token, you generated in your Jenkins user profile's settings.)

  • A build token, which you need o create in your pipeline's configuration (pipeline -> configuration -> build triggers -> trigger builds remotely).

Implementation notes

That's nothing, 3…4 lines Curl wouldn't do in the same manner. But I felt, that using Golang enforces stricter style. And it's more joy (at least for me) using Golang.

References