From cf666ed055e1e76c5acf0d323d87438bfb8342d6 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Thu, 30 Sep 2021 22:31:47 +0200 Subject: check_jenkins_job --- check_jenkins_job | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'check_jenkins_job') 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 ) -- cgit v1.2.3