I am still getting incorrect results from PR Decoration after setting change. Partial log result shows:
2020.06.12 09:50:26 INFO ce[AXKn8AhrNDndQmMjymND][o.s.c.t.s.ComputationStepExecutor] Trigger refresh of Portfolios and Applications | status=SUCCESS | time=0ms
2020.06.12 09:50:26 INFO ce[AXKn8AhrNDndQmMjymND][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Webhooks | globalWebhooks=0 | projectWebhooks=0 | status=SUCCESS | time=2ms
2020.06.12 09:50:26 ERROR ce[AXKn8AhrNDndQmMjymND][c.s.C.D.D.B] Configuration is incomplete: GitlabPrSettings{instanceUrl='https://git.company.com/api/v4', token='********************', projectId=null, projectUrl=null, prId=2111}
2020.06.12 09:50:26 INFO ce[AXKn8AhrNDndQmMjymND][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Pull Request decoration | status=SUCCESS | time=8ms
The portion of the gitlab-runner yaml is for Merge Requests:
SonarQube analysis:
stage: quality
# We annotate only merge requests here. This job is to have merge requests decorated in GitLab.
# There is a CI_MERGE_REQUEST_IID parameter for merge_requests always. We set sonarOptions here for a merge request only.
script:
- echo ${CI_MERGE_REQUEST_IID}
- |
sonarOptions="-Dsonar.pullrequest.branch=${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} -Dsonar.pullrequest.base=${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} -Dsonar.pullrequest.key=${CI_MERGE_REQUEST_IID}" && \
./gradlew --parallel build -x test ${sonarOptions} sonarqube
only:
- merge_requests
when: manual
allow_failure: false
and for develop branch only:
SonarQube develop branch analysis:
stage: triggers
# We annotate develop branch here only.
# This job is for sending continuous analysis to SonarQube, so we will see progress of fixing static analysis issues.
script:
# We dont need SonarQube to run each hour for scheduled pipeline with MONKEY_TEST parameter
- |
sonarOptions="-Dsonar.branch.name=${CI_COMMIT_BRANCH}" && \
./gradlew --parallel build -x test ${sonarOptions} sonarqube
only:
- develop
and we expect it will be including settings from build.gradle:
sonarqube {
androidVariant 'debug'
properties {
property "sonar.sourceEncoding", "UTF-8"
property "sonar.verbose", true
property "sonar.host.url", "https://sonarqube.example.com"
property "sonar.login", "REDACTED"
property "sonar.branch.name", "develop"
property "sonar.projectName", "Atom (Streamer device)"
property "sonar.projectKey", "cubi-android-example-app"
property "sonar.sourceEncoding", "UTF-8"
property "sonar.projectVersion", getAtomVersionName()
property "sonar.issuesReport.html.enable", "true"
property "sonar.issuesReport.console.enable", "true"
property "sonar.verbose", "true"
property "detekt.sonar.kotlin.config.path", "quality/detekt/detekt-config.yml"
// no code coverage in Atom yet
// property "sonar.coverage.jacoco.xmlReportPaths", findAllReports()
// property "sonar.java.coveragePlugin", "jacoco"
}
}