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