From 250f2996609de0441f0f9132f2606a31edec6d52 Mon Sep 17 00:00:00 2001 From: Aravind <95919403+aravind-opsverse@users.noreply.github.com> Date: Thu, 15 Feb 2024 15:34:41 +0530 Subject: [PATCH] Update the script to fix the var issue --- script/check-quality-gate.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/script/check-quality-gate.sh b/script/check-quality-gate.sh index d288417..1d0f8de 100755 --- a/script/check-quality-gate.sh +++ b/script/check-quality-gate.sh @@ -47,9 +47,8 @@ printf '\n' analysisId="$(jq -r '.task.analysisId' <<< "${task}")" qualityGateUrl="${serverUrl}/api/qualitygates/project_status?analysisId=${analysisId}" -sonarQubeResponse="$(curl --location --location-trusted --max-redirs 10 --silent --fail --show-error --user "${SONAR_TOKEN}": "${qualityGateUrl}")" -qualityGateStatus="$(sonarQubeResponse | jq -r '.projectStatus.status')" -qualityGateProjectStatus="$(sonarQubeResponse | jq -r '.projectStatus.conditions')" +qualityGateStatus="$(curl --location --location-trusted --max-redirs 10 --silent --fail --show-error --user "${SONAR_TOKEN}": "${qualityGateUrl}" | jq -r '.projectStatus.status')" +qualityGateProjectStatus="$(curl --location --location-trusted --max-redirs 10 --silent --fail --show-error --user "${SONAR_TOKEN}": "${qualityGateUrl}" | jq -r '.projectStatus.conditions')" dashboardUrl="$(sed -n 's/dashboardUrl=\(.*\)/\1/p' "${metadataFile}")" analysisResultMsg="Detailed information can be found at: ${dashboardUrl}\n"