Created
December 11, 2015 03:16
-
-
Save pi-aej/32f545d43d89d40a1905 to your computer and use it in GitHub Desktop.
Get upstream build number from Jenkins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPSTREAM=`curl "http://jenkins:8080/job/upstreamjob/lastBuild/api/xml?depth=1&xpath=/freeStyleBuild/number"` | |
NUMBER=`echo "$UPSTREAM" | sed "s/[^0-9]//g"` | |
wget http://jenkins:8080/job/upstreamjob/$NUMBER/artifact/workspace/VERSION -O VERSION |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment