aboutsummaryrefslogtreecommitdiff
path: root/check_jenkins_job
diff options
context:
space:
mode:
Diffstat (limited to 'check_jenkins_job')
-rwxr-xr-xcheck_jenkins_job6
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 )