diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2021-09-30 22:31:47 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2021-09-30 22:31:47 +0200 |
commit | cf666ed055e1e76c5acf0d323d87438bfb8342d6 (patch) | |
tree | 4d1077c39fe5e3ad893dc07a7cfb17e6d1d16ae0 /check_jenkins_job | |
parent | 05186426f9877b714612c3b63d68aeabc126a16a (diff) | |
download | monitoring_custom-cf666ed055e1e76c5acf0d323d87438bfb8342d6.tar.gz |
check_jenkins_job
Diffstat (limited to 'check_jenkins_job')
-rwxr-xr-x | check_jenkins_job | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/check_jenkins_job b/check_jenkins_job index 757bc7a..ab40f87 100755 --- a/check_jenkins_job +++ b/check_jenkins_job @@ -10,10 +10,12 @@ fi JENKINS_URL=$1 VIEW=$2 JOB=$3 +PASS=$5 +USER=$4 -shift 3 +shift 5 -CURL_OUT=$( curl -s $@ $JENKINS_URL/view/$VIEW/job/$JOB/lastBuild/api/json ) +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 ) |