-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Centos, Java 6, Jenkins 1.410
When adding a shell action to a promotion process on a job that is using subversion source control the SVN_REVISION environment variable is not provided. The BUILD_NUMBER environment variable is there and correct, so we can work around it as so:
export SVN_REVISION=`wget -qO- http://<host>/job/spike-application/${BUILD_NUMBER}/api/xml?tree=changeSet[revisions[revision]] | grep -o "[0-9]\+"` echo PROMOTED ${SVN_REVISION} from unstable to stable
However, that's obviously horrible and given the BUILD_NUMBER is available it should be possible to retrieve the SVN_REVISION without an HTTP request.