mirror of
https://github.com/SonarSource/sonarqube-quality-gate-action.git
synced 2026-10-02 09:51:31 +00:00
Include SONAR_ROOT_CERT option custom TRA certificates (#39)
This commit is contained in:
1 parent
cfad4b4364
commit
b438cfa1bd
2 files changed
+9
No files matched your search
@@ -27,6 +27,13 @@ if [ -z "${serverUrl}" ] || [ -z "${ceTaskUrl}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -n "${SONAR_ROOT_CERT}" ]]; then
|
||||
echo "Adding custom root certificate to ~/.curlrc"
|
||||
rm -f /tmp/tmpcert.pem
|
||||
echo "${SONAR_ROOT_CERT}" > /tmp/tmpcert.pem
|
||||
echo "--cacert /tmp/tmpcert.pem" >> ~/.curlrc
|
||||
fi
|
||||
|
||||
task="$(curl --location --location-trusted --max-redirs 10 --silent --fail --show-error --user "${SONAR_TOKEN}": "${ceTaskUrl}")"
|
||||
status="$(jq -r '.task.status' <<< "$task")"
|
||||
|
||||
|
||||
Reference in new issue
Block a user