From 5af1f01bc0f7302de632f22abf8e432d59e26487 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Thu, 18 Apr 2024 08:46:43 -0600 Subject: [PATCH] Per #2379, switch to pushing SonarQube scans to a single MET project for both the sonarqube.yml workflow and the nightly build. --- internal/scripts/docker/build_met_sonarqube.sh | 4 +--- internal/scripts/sonarqube/run_sonarqube.sh | 4 +--- internal/scripts/sonarqube/sonar-project.properties | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/internal/scripts/docker/build_met_sonarqube.sh b/internal/scripts/docker/build_met_sonarqube.sh index 31ad7e65f0..b3e7192b05 100755 --- a/internal/scripts/docker/build_met_sonarqube.sh +++ b/internal/scripts/docker/build_met_sonarqube.sh @@ -84,9 +84,7 @@ SONAR_PROPERTIES=sonar-project.properties # Configure the sonar-project.properties [ -e $SONAR_PROPERTIES ] && rm $SONAR_PROPERTIES -sed -e "s|SONAR_PROJECT_KEY|MET-GHA|" \ - -e "s|SONAR_PROJECT_NAME|MET GHA|" \ - -e "s|SONAR_PROJECT_VERSION|$SONAR_PROJECT_VERSION|" \ +sed -e "s|SONAR_PROJECT_VERSION|$SONAR_PROJECT_VERSION|" \ -e "s|SONAR_HOST_URL|$SONAR_HOST_URL|" \ -e "s|SONAR_TOKEN|$SONAR_TOKEN|" \ -e "s|SONAR_BRANCH_NAME|$MET_GIT_NAME|" \ diff --git a/internal/scripts/sonarqube/run_sonarqube.sh b/internal/scripts/sonarqube/run_sonarqube.sh index b05ab2a7ca..72eb7d7760 100755 --- a/internal/scripts/sonarqube/run_sonarqube.sh +++ b/internal/scripts/sonarqube/run_sonarqube.sh @@ -130,9 +130,7 @@ if [ -z "$SONAR_TOKEN" ]; then exit 1 else [ -e $SONAR_PROPERTIES ] && rm $SONAR_PROPERTIES - sed -e "s|SONAR_PROJECT_KEY|MET_NB|" \ - -e "s|SONAR_PROJECT_NAME|MET Nightly Build|" \ - -e "s|SONAR_PROJECT_VERSION|$SONAR_PROJECT_VERSION|" \ + sed -e "s|SONAR_PROJECT_VERSION|$SONAR_PROJECT_VERSION|" \ -e "s|SONAR_HOST_URL|$SONAR_HOST_URL|" \ -e "s|SONAR_TOKEN|$SONAR_TOKEN|" \ -e "s|SONAR_BRANCH_NAME|${1}|" \ diff --git a/internal/scripts/sonarqube/sonar-project.properties b/internal/scripts/sonarqube/sonar-project.properties index 215749e75b..30ee495c7b 100644 --- a/internal/scripts/sonarqube/sonar-project.properties +++ b/internal/scripts/sonarqube/sonar-project.properties @@ -1,6 +1,6 @@ # Project and source code settings -sonar.projectKey=SONAR_PROJECT_KEY -sonar.projectName=SONAR_PROJECT_NAME +sonar.projectKey=MET +sonar.projectName=MET sonar.projectVersion=SONAR_PROJECT_VERSION sonar.branch.name=SONAR_BRANCH_NAME sonar.sources=src,scripts/python,data/wrappers