From d9c5fec963243903f154c0e6225ac6acec2927cf Mon Sep 17 00:00:00 2001 From: Anna Kimball <131040494+ankimball@users.noreply.github.com> Date: Wed, 4 Sep 2024 08:10:18 -0500 Subject: [PATCH] [develop] Fix for SonarQube forked repo renaming failure (#1115) SonarQube job fails to find user's repository if they rename when creating a fork, this change to the Jenkinsfile will pass the user's url to the SonarQube job so that it doesn't have to form the URL itself. Also passes change ID (PR number) so that information on the SonarQube job can be archived to s3 and properly aligned with the corresponding PR. --- .cicd/Jenkinsfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.cicd/Jenkinsfile b/.cicd/Jenkinsfile index e6ed9515f..5b90ab117 100644 --- a/.cicd/Jenkinsfile +++ b/.cicd/Jenkinsfile @@ -29,9 +29,15 @@ pipeline { stage('Launch SonarQube') { steps { script { + echo "BRANCH_NAME=${env.CHANGE_BRANCH}" + echo "FORK_NAME=${env.CHANGE_FORK}" + echo "CHANGE_URL=${env.CHANGE_URL}" + echo "CHANGE_ID=${env.CHANGE_ID}" build job: '/ufs-srweather-app/ufs-srw-sonarqube', parameters: [ string(name: 'BRANCH_NAME', value: env.CHANGE_BRANCH ?: 'develop'), - string(name: 'FORK_NAME', value: env.CHANGE_FORK ?: '') + string(name: 'FORK_NAME', value: env.CHANGE_FORK ?: ''), + string(name: 'CHANGE_URL', value: env.CHANGE_URL ?: ''), + string(name: 'CHANGE_ID', value: env.CHANGE_ID ?: '') ], wait: false } }