remove Exit to avoid pipeline exits in GHA

Removing the Exit. to just alert as Warning instead of quitting the job in CI Context. Although sonarqube is recommending using Gradle/Maven plugins to scan Java projects. Yet, some integrations in favor of Decoupling Dev Code from CI Code might prefer to use the Github Scanner action (to decouple Source Code from Scan Operations).
This commit is contained in:
rr-zoobin-jafari 2024-05-16 09:35:18 -04:00 committed by GitHub
parent 0c14a18753
commit 391104e595
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,13 +21,11 @@ if [[ -n "${SONAR_ROOT_CERT}" ]]; then
fi
if [[ -f "${INPUT_PROJECTBASEDIR%/}/pom.xml" ]]; then
echo "Maven project detected. You should run the goal 'org.sonarsource.scanner.maven:sonar' during build rather than using this GitHub Action."
exit 1
echo "WARNING! Maven project detected. You should run the goal 'org.sonarsource.scanner.maven:sonar' during build rather than using this GitHub Action."
fi
if [[ -f "${INPUT_PROJECTBASEDIR%/}/build.gradle" ]]; then
echo "Gradle project detected. You should use the SonarQube plugin for Gradle during build rather than using this GitHub Action."
exit 1
echo "WARNING! Gradle project detected. You should use the SonarQube plugin for Gradle during build rather than using this GitHub Action."
fi
unset JAVA_HOME