diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2021-09-30 23:32:45 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2021-09-30 23:32:45 +0200 |
commit | 536bd24438799a15686415b054f57676b053702d (patch) | |
tree | ac5b93d2a342166c3d2d11a867934ec725b7273e /check_jenkins_job | |
parent | cf666ed055e1e76c5acf0d323d87438bfb8342d6 (diff) | |
download | monitoring_custom-536bd24438799a15686415b054f57676b053702d.tar.gz |
move
Diffstat (limited to 'check_jenkins_job')
-rwxr-xr-x | check_jenkins_job | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/check_jenkins_job b/check_jenkins_job deleted file mode 100755 index ab40f87..0000000 --- a/check_jenkins_job +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Usage: check_jenkins_job <jenkins-url> <view> <job> <curl opts ...> - -if [ "$#" -lt 3 ]; then - echo "Usage: $0 <jenkins-url> <view> <job> <curl opts ...>" - exit 3 -fi - -JENKINS_URL=$1 -VIEW=$2 -JOB=$3 -PASS=$5 -USER=$4 - -shift 5 - -CURL_OUT=$( curl -s --basic -u "$USER:$PASS" $@ $JENKINS_URL/view/$VIEW/job/$JOB/lastBuild/api/json ) - -RESULT=$( jq -r .result <<< $CURL_OUT ) -ID=$( jq -r .displayName <<< $CURL_OUT ) - -if [ "$RESULT" = "SUCCESS" ]; then - echo JOB OK: $JOB $ID succeeded - exit 0 -fi - -echo JOB CRITICAL: $JOB $ID failed -exit 2 |