Skip to content

Commit

Permalink
fix: sonar scanner argoproj#18513 (argoproj#18559)
Browse files Browse the repository at this point in the history
* fix: sonar scanning

Signed-off-by: rumstead <[email protected]>

* updating action to use sha

Co-authored-by: Michael Crenshaw <[email protected]>
Signed-off-by: rumstead <[email protected]>

---------

Signed-off-by: rumstead <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
  • Loading branch information
rumstead and crenshaw-dev committed Jun 10, 2024
1 parent 32519c7 commit 2547abc
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -380,30 +380,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SCANNER_VERSION: 4.2.0.1873
SCANNER_PATH: /tmp/cache/scanner
OS: linux
run: |
# We do not use the provided action, because it does contain an old
# version of the scanner, and also takes time to build.
set -e
mkdir -p ${SCANNER_PATH}
export SONAR_USER_HOME=${SCANNER_PATH}/.sonar
if [[ ! -x "${SCANNER_PATH}/sonar-scanner-${SCANNER_VERSION}-${OS}/bin/sonar-scanner" ]]; then
curl -Ol https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SCANNER_VERSION}-${OS}.zip
unzip -qq -o sonar-scanner-cli-${SCANNER_VERSION}-${OS}.zip -d ${SCANNER_PATH}
fi
chmod +x ${SCANNER_PATH}/sonar-scanner-${SCANNER_VERSION}-${OS}/bin/sonar-scanner
chmod +x ${SCANNER_PATH}/sonar-scanner-${SCANNER_VERSION}-${OS}/jre/bin/java
# Explicitly set NODE_MODULES
export NODE_MODULES=${PWD}/ui/node_modules
export NODE_PATH=${PWD}/ui/node_modules
${SCANNER_PATH}/sonar-scanner-${SCANNER_VERSION}-${OS}/bin/sonar-scanner
uses: SonarSource/sonarqube-scan-action@86fe81775628f1c6349c28baab87881a2170f495 # v2.1.0
if: env.sonar_secret != ''

test-e2e:
name: Run end-to-end tests
if: ${{ needs.changes.outputs.backend == 'true' }}
Expand Down

0 comments on commit 2547abc

Please sign in to comment.