Skip to content

Instantly share code, notes, and snippets.

@derinbay
Created March 8, 2018 08:00
Show Gist options
  • Save derinbay/1f5b591d03c626f9b6e42d4c529888c3 to your computer and use it in GitHub Desktop.
Save derinbay/1f5b591d03c626f9b6e42d4c529888c3 to your computer and use it in GitHub Desktop.
deployment check for jenkins
#!/usr/bin/bash
CURL='/usr/bin/curl'
CURLARGS="-g"
URL="https://taylan:xxxxxxxxxxxxxxxxx@jenkins.n11.com/api/xml?tree=jobs[name,color]&xpath=/hudson/job[ends-with(color/text(),\"_anime\")]&wrapper=jobs"
raw=$($CURL $CURLARGS $URL)
echo $raw
if [[ $raw = *"QA"* ]] && [[ $raw = *"Release"* ]]; then
echo "\n--------------------------QA RELEASE JOB IS WORKING!--------------------------\n"
echo "Please trigger the job again after the release job is complete"
exit -1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment