screwdriver-coverage-sonar 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/commands.txt +5 -2
- package/package.json +1 -1
package/commands.txt
CHANGED
|
@@ -10,8 +10,11 @@ if echo $SCM_URL | grep git@ > /dev/null 2>&1; then export SONAR_SCM_URL=`echo $
|
|
|
10
10
|
if [ ! -z "$SD_SELF_SONAR_HOST" ]; then SCANNER_OPTION='"-Dsonar.host.url=$SD_SELF_SONAR_HOST" "-Dsonar.login=$SONAR_TOKEN" "-Dsonar.projectKey=$SD_SONAR_PROJECT_KEY" "-Dsonar.projectName=$SD_SONAR_PROJECT_NAME" "-Dsonar.projectVersion=$PROJECT_VERSION" "-Dsonar.links.scm=$SONAR_SCM_URL" "-Dsonar.links.ci=$SD_UI_URL/pipelines/$SD_PIPELINE_ID" "-Dsonar.scm.revision=$SD_BUILD_SHA" $SONAR_OPTIONS'; else SCANNER_OPTION='"-Dsonar.host.url=$SD_SONAR_HOST" "-Dsonar.login=$SONAR_TOKEN" "-Dsonar.projectKey=$SD_SONAR_PROJECT_KEY" "-Dsonar.projectName=$SD_SONAR_PROJECT_NAME" "-Dsonar.projectVersion=$PROJECT_VERSION" "-Dsonar.links.scm=$SONAR_SCM_URL" "-Dsonar.links.ci=$SD_UI_URL/pipelines/$SD_PIPELINE_ID" "-Dsonar.scm.revision=$SD_BUILD_SHA" $SONAR_OPTIONS'; fi
|
|
11
11
|
SCANNER_PATH="/opt/sd/sonar-scanner/bin/sonar-scanner"
|
|
12
12
|
if [ -s ${SCANNER_PATH} ] && [ -x ${SCANNER_PATH} ]; then eval $SCANNER_PATH $SCANNER_OPTION || true; exit 0; fi
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
OS="$(uname)"
|
|
14
|
+
ARCH="$(uname -m)"
|
|
15
|
+
if [ "$OS" = 'Darwin' ]; then TARGET_OS='macosx'; else TARGET_OS='linux'; fi
|
|
16
|
+
if [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then TARGET_ARCH='-arm64'; else TARGET_ARCH=''; fi
|
|
17
|
+
SCANNER_PATH="/opt/sd/sonarscanner-cli-${TARGET_OS}${TARGET_ARCH}/bin/sonar-scanner"
|
|
15
18
|
if [ -s ${SCANNER_PATH} ] && [ -x ${SCANNER_PATH} ]; then eval $SCANNER_PATH $SCANNER_OPTION || true; exit 0; fi
|
|
16
19
|
if unzip -version > /dev/null 2>&1; then SD_UNZIP_CMD_WRAPPER="eval"; else SD_UNZIP_CMD_WRAPPER="sd-step exec --pkg-version 6.0 core/unzip"; fi
|
|
17
20
|
export SD_UNZIP_CMD_WRAPPER
|