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"