From 0bf40bd8f83b34841d1b4b601759cf9c977c3dfa Mon Sep 17 00:00:00 2001 From: Marc Nuri Date: Tue, 11 Jul 2023 14:49:56 +0200 Subject: [PATCH] ci: Sonar has complete report "Could not find ref 'master' in refs/heads, refs/remotes/upstream or refs/remotes/origin. You may see unexpected issues and changes. Please make sure to fetch this ref before pull request analysis." Signed-off-by: Marc Nuri --- .jenkins/pipelines/sonar.Jenkinsfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.jenkins/pipelines/sonar.Jenkinsfile b/.jenkins/pipelines/sonar.Jenkinsfile index 6134259c02..e186f416df 100644 --- a/.jenkins/pipelines/sonar.Jenkinsfile +++ b/.jenkins/pipelines/sonar.Jenkinsfile @@ -15,6 +15,9 @@ pipeline { when { changeRequest() } steps { sh 'echo "Building Project and analyzing with Sonar"' + // Required by Sonar to compare coverage info, etc. with master + sh 'git remote add upstream https://github.com/eclipse/jkube.git' + sh 'git fetch upstream' // Needs install instad of verify since ITs rely on artifacts from previous modules sh './mvnw -V -B -e -Pjacoco,sonar install ' + '-Dsonar.pullrequest.key=${CHANGE_ID} ' +