Package hudson.plugins.sonar.utils
Class SonarUtils
java.lang.Object
hudson.plugins.sonar.utils.SonarUtils
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SonarAnalysisAction
addBuildInfoFromLastBuildTo
(Run<?, ?> build, TaskListener listener, SonarInstallation sonarInstallation, boolean isSkipped) static SonarAnalysisAction
addBuildInfoFromLastBuildTo
(Run<?, ?> build, TaskListener listener, SonarInstallation sonarInstallation, String credentialId, boolean isSkipped) static SonarAnalysisAction
addBuildInfoTo
(Run<?, ?> build, TaskListener listener, FilePath workspace, SonarInstallation sonarInstallation) static SonarAnalysisAction
addBuildInfoTo
(Run<?, ?> build, TaskListener listener, FilePath workspace, SonarInstallation sonarInstallation, String credentialId) static SonarAnalysisAction
addBuildInfoTo
(Run<?, ?> build, TaskListener listener, FilePath workspace, SonarInstallation sonarInstallation, String credentialId, boolean skippedIfNoBuild) static SonarAnalysisAction
addEmptyBuildInfo
(Run<?, ?> build, TaskListener listener, SonarInstallation sonarInstallation, String credentialId, boolean isSkipped) static Float
extractMajorMinor
(String version) static Properties
extractReportTask
(TaskListener listener, FilePath workspace) static String
getAuthenticationToken
(Run<?, ?> build, SonarInstallation inst, String credentialsId) static org.jenkinsci.plugins.plaincredentials.StringCredentials
getCredentials
(Run<?, ?> build, String credentialsId) static String
getMavenGoal
(String version) static <T extends Action>
TgetPersistentAction
(Actionable actionable, Class<T> type) getPersistentActions
(Actionable actionable, Class<T> type) static String
getTokenProperty
(SonarInstallation inst, HttpClient client) static Version
getVersion
(SonarInstallation inst, HttpClient client) static boolean
-
Field Details
-
SERVER_URL_KEY
- See Also:
-
DASHBOARD_URL_KEY
- See Also:
-
CE_TASK_ID_KEY
- See Also:
-
REPORT_TASK_FILE_NAME
- See Also:
-
PROPERTY_SONAR_LOGIN
- See Also:
-
PROPERTY_SONAR_TOKEN
- See Also:
-
-
Method Details
-
getPersistentActions
-
getPersistentAction
@CheckForNull public static <T extends Action> T getPersistentAction(Actionable actionable, Class<T> type) -
extractReportTask
public static Properties extractReportTask(TaskListener listener, FilePath workspace) throws IOException, InterruptedException - Throws:
IOException
InterruptedException
-
addBuildInfoTo
@Nullable public static SonarAnalysisAction addBuildInfoTo(Run<?, ?> build, TaskListener listener, FilePath workspace, SonarInstallation sonarInstallation, @Nullable String credentialId, boolean skippedIfNoBuild) throws IOException, InterruptedException- Throws:
IOException
InterruptedException
-
addBuildInfoTo
public static SonarAnalysisAction addBuildInfoTo(Run<?, ?> build, TaskListener listener, FilePath workspace, SonarInstallation sonarInstallation) throws IOException, InterruptedException- Throws:
IOException
InterruptedException
-
addBuildInfoTo
public static SonarAnalysisAction addBuildInfoTo(Run<?, ?> build, TaskListener listener, FilePath workspace, SonarInstallation sonarInstallation, @Nullable String credentialId) throws IOException, InterruptedException- Throws:
IOException
InterruptedException
-
addBuildInfoFromLastBuildTo
public static SonarAnalysisAction addBuildInfoFromLastBuildTo(Run<?, ?> build, TaskListener listener, SonarInstallation sonarInstallation, boolean isSkipped) throws IOException, InterruptedException- Throws:
IOException
InterruptedException
-
addBuildInfoFromLastBuildTo
public static SonarAnalysisAction addBuildInfoFromLastBuildTo(Run<?, ?> build, TaskListener listener, SonarInstallation sonarInstallation, @Nullable String credentialId, boolean isSkipped) throws IOException, InterruptedException- Throws:
IOException
InterruptedException
-
addEmptyBuildInfo
public static SonarAnalysisAction addEmptyBuildInfo(Run<?, ?> build, TaskListener listener, SonarInstallation sonarInstallation, @Nullable String credentialId, boolean isSkipped) throws IOException, InterruptedException- Throws:
IOException
InterruptedException
-
getMavenGoal
-
extractMajorMinor
-
getAuthenticationToken
@CheckForNull public static String getAuthenticationToken(Run<?, ?> build, SonarInstallation inst, @Nullable String credentialsId) -
getCredentials
-
getTokenProperty
-
getVersion
-
isSonarCloud
-