Class SonarQubePointGenerator
java.lang.Object
jenkinsci.plugins.influxdb.generators.AbstractPointGenerator
jenkinsci.plugins.influxdb.generators.SonarQubePointGenerator
- All Implemented Interfaces:
PointGenerator
-
Field Summary
Fields inherited from class jenkinsci.plugins.influxdb.generators.AbstractPointGenerator
build, BUILD_NUMBER, CUSTOM_PREFIX, INSTANCE, PROJECT_NAME, PROJECT_NAMESPACE, PROJECT_PATH, timestamp
-
Constructor Summary
ConstructorsConstructorDescriptionSonarQubePointGenerator
(Run<?, ?> build, TaskListener listener, ProjectNameRenderer projectNameRenderer, long timestamp, String jenkinsEnvParameterTag, String customPrefix, EnvVars env) -
Method Summary
Modifier and TypeMethodDescriptionfindReportByFileName
(String workspacePath) com.influxdb.client.write.Point[]
generate()
protected String
getSonarMetric
(String url, String metric) getSonarMetricStr
(String url, String metric) boolean
void
Methods inherited from class jenkinsci.plugins.influxdb.generators.AbstractPointGenerator
buildPoint, buildPoint, parsePropertiesString, resolveEnvParameterAndTransformToMap
-
Constructor Details
-
SonarQubePointGenerator
public SonarQubePointGenerator(Run<?, ?> build, TaskListener listener, ProjectNameRenderer projectNameRenderer, long timestamp, String jenkinsEnvParameterTag, String customPrefix, EnvVars env)
-
-
Method Details
-
getProjectKey
-
getSonarBuildURL
-
getSonarBuildTaskIdUrl
-
getSonarBuildTaskId
-
hasReport
public boolean hasReport()- Returns:
- true, if environment variable LOG_SONAR_QUBE_RESULTS is set to true and SQ Reports exist
-
setEnv
-
generate
public com.influxdb.client.write.Point[] generate() -
getResult
- Throws:
IOException
-
findReportByFileName
public List<Path> findReportByFileName(String workspacePath) throws IOException, UncheckedIOException - Throws:
IOException
UncheckedIOException
-
getSonarMetricStr
- Throws:
IOException
-
getSonarMetric
- Throws:
IOException
-