Skip to content

Commit

Permalink
Update the script to fix the var issue
Browse files Browse the repository at this point in the history
  • Loading branch information
aravind-opsverse authored Feb 15, 2024
1 parent a4636c7 commit 250f299
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions script/check-quality-gate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 250f299

Please sign in to comment.