public static String getVcsRevision(Map<String, String> env) {
        String revision = env.get("SVN_REVISION");
        if (StringUtils.isBlank(revision)) {
            revision = env.get(GIT_COMMIT);
        }
        if (StringUtils.isBlank(revision)) {
            revision = env.get("P4_CHANGELIST");
        }
        return revision;
    }
public static String getVcsRevision ( Map < String , String > env ) { String revision = env . get ( "SVN_REVISION" ) ; if ( StringUtils . isBlank ( revision ) ) { revision = env . get ( GIT_COMMIT ) ; } if ( StringUtils . isBlank ( revision ) ) { revision = env . get ( "P4_CHANGELIST" ) ; } return revision ; }
Get the VCS revision from the Jenkins build environment. The search will one of "SVN_REVISION", "GIT_COMMIT",
"P4_CHANGELIST" in the environment.

@param env Th Jenkins build environment.
@return The vcs revision for supported VCS