Skip to content

Instantly share code, notes, and snippets.

View julianchurchill's full-sized avatar

Julian Churchill julianchurchill

View GitHub Profile
@julianchurchill
julianchurchill / checkJenkins.sh
Last active December 20, 2022 09:10
A bash script to query a Jenkins server. Use like this: 'checkJenkins.sh <jobname>' and it will query the server with the given job name every 30s. Use like this: 'checkJenkins.sh <jobname> tmux' and it will query the server once and output tmux coloured messages appropriate to display in a tmux status bar. E.g. add this to your .tmux.conf 'set …
#!/bin/bash
CONSOLE_RED="\033[2;31m"
CONSOLE_GREEN="\033[2;32m"
CONSOLE_CLEAR="\033[0m"
JENKINS_SERVER=http://my_jenkins_server
JOB=$1
JOB_QUERY=/job/${JOB}