Hi, I'm looking to try and setup a post build groovy script event with my Jenkinsfile for my multibranch job. Is this possible? I'm looking to try and update the build display name with the svn revision number used at the time of the build. This is the jenkinsfile script im using:
node() { stage 'SVN' checkout scm stage 'Compile Win32' //bat 'call make\\jenkins\\jenkins_build_win32.bat' stage 'Archive Artifacts' //archive '_archive/**' stage 'Post Build' echo 'Result: ' + manager.build.result.toString() //if (manager.build.getResult() == 'SUCCESS') //{ def buildNum = manager.build.number def buildRev = manager.build.envVars['SVN_REVISION'] def buildSvn = manager.build.envVars['SVN_URL'] def buildUrl = manager.build.envVars['BUILD_URL'] def buildLabel = manager.build.getDisplayName() echo 'Num: ' + buildNum + ' Rev: ' + buildRev + ' SVN Url: ' + buildSvn + ' URL: ' + buildUrl manager.build.setDisplayName(buildLabel + ' - Revision: ') //} } manager.build.result is always null. I imagine its because the build has not completed. both buildRev and buildSvn are also null at this time. Any help would be appreciated. Mike -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8cd195b3-07c8-49fe-8df1-440b9a8294e0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.