Schließlich habe ich das Protokoll nach der Versionsnummer im Ausgabeprotokoll analysiert:
// Initialize some stuff def build = Thread.currentThread().executable def log = manager.build.logFile.text // We are looking for maven parameter -DreleaseVersion=1.1.1 (space at the end) def versionFinder = log =~ /-DreleaseVersion=([0-9]+\.[0-9]+\.[0-9]+) / def RELEASE_VERSION="" if (versionFinder.size() > 0) { RELEASE_VERSION=versionFinder.getAt(0)[1]; } if (RELEASE_VERSION > "") { manager.listener.logger.println("Release version: " + RELEASE_VERSION); // Continue with release script // For example, here: // https://wiki.jenkins-ci.org/display/JENKINS/Groovy+plugin }