I created a pipeline job and would like to get the svn version number to enable further downstream processing in a call to a shell script. I am using a pipeline script simi
In Groovy pipeline script it's possible to get results of checkout scm
command into TreeMap variable and then get what you need:
def checkoutResults = checkout([
poll: false,
scm: [
$class: 'SubversionSCM',
...
]
])
echo 'checkout results' + checkoutResults.toString()
echo 'checkout revision' + checkoutResults['SVN_REVISION']
echo 'checkout revision' + checkoutResults['SVN_REVISION_1']
echo 'checkout revision' + checkoutResults['SVN_REVISION_2']