mirror of
https://github.com/sonarsource/sonarcloud-github-action.git
synced 2026-06-08 03:17:14 +00:00
SCSCANGHA-24 Update the Docker base image to the latest minor 11.1
This commit is contained in:
parent
2900b02098
commit
383f7e52ea
5 changed files with 37 additions and 10 deletions
20
.github/workflows/qa.yml
vendored
20
.github/workflows/qa.yml
vendored
|
|
@ -141,4 +141,22 @@ jobs:
|
||||||
- name: Assert
|
- name: Assert
|
||||||
run: |
|
run: |
|
||||||
./test/assertFileContains ./output.properties "sonar.verbose=true"
|
./test/assertFileContains ./output.properties "sonar.verbose=true"
|
||||||
|
overrideSonarcloudUrlTest:
|
||||||
|
name: >
|
||||||
|
'SONARCLOUD_URL' is used
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Run action with SONARCLOUD_URL
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
args: -Dsonar.scanner.internal.dumpToFile=./output.properties
|
||||||
|
env:
|
||||||
|
SONARCLOUD_URL: mirror.sonarcloud.io
|
||||||
|
SONAR_TOKEN: FAKE_TOKEN
|
||||||
|
- name: Assert
|
||||||
|
run: |
|
||||||
|
./test/assertFileContains ./output.properties "sonar.host.url=mirror.sonarcloud.io"
|
||||||
|
./test/assertFileContains ./output.properties "sonar.scanner.sonarcloudUrl=mirror.sonarcloud.io"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
FROM sonarsource/sonar-scanner-cli:11.0
|
FROM sonarsource/sonar-scanner-cli:11.1
|
||||||
|
|
||||||
LABEL version="3.0.0" \
|
LABEL version="3.1.0" \
|
||||||
repository="https://github.com/sonarsource/sonarcloud-github-action" \
|
repository="https://github.com/sonarsource/sonarcloud-github-action" \
|
||||||
homepage="https://github.com/sonarsource/sonarcloud-github-action" \
|
homepage="https://github.com/sonarsource/sonarcloud-github-action" \
|
||||||
maintainer="SonarSource" \
|
maintainer="SonarSource" \
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -e
|
set -eo pipefail
|
||||||
|
|
||||||
|
declare -a args=()
|
||||||
|
|
||||||
if [[ -z "${SONAR_TOKEN}" ]]; then
|
if [[ -z "${SONAR_TOKEN}" ]]; then
|
||||||
echo "Set the SONAR_TOKEN env variable."
|
echo "Set the SONAR_TOKEN env variable."
|
||||||
|
|
@ -17,14 +19,16 @@ if [[ -f "${INPUT_PROJECTBASEDIR%/}/build.gradle" || -f "${INPUT_PROJECTBASEDIR%
|
||||||
to get more accurate results."
|
to get more accurate results."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${SONARCLOUD_URL}" ]]; then
|
if [[ ${SONARCLOUD_URL} ]]; then
|
||||||
SONARCLOUD_URL="https://sonarcloud.io"
|
args+=("-Dsonar.scanner.sonarcloudUrl=${SONARCLOUD_URL}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
debug_flag=''
|
|
||||||
if [[ "$RUNNER_DEBUG" == '1' ]]; then
|
if [[ "$RUNNER_DEBUG" == '1' ]]; then
|
||||||
debug_flag=' --debug '
|
args+=("--debug")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset JAVA_HOME
|
unset JAVA_HOME
|
||||||
sonar-scanner $debug_flag -Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR} -Dsonar.host.url=${SONARCLOUD_URL} ${INPUT_ARGS}
|
|
||||||
|
args+=("-Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR}")
|
||||||
|
|
||||||
|
sonar-scanner "${args[@]}" ${INPUT_ARGS}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,13 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
error() { echo -e "\\e[31m✗ $*\\e[0m"; }
|
error() { echo -e "\\e[31m✗ $*\\e[0m"; }
|
||||||
|
|
||||||
assertFileExists $1
|
. ${BASH_SOURCE%/*}/assertFileExists $1
|
||||||
|
|
||||||
if ! grep -q $2 $1; then
|
if ! grep -q $2 $1; then
|
||||||
error "'$2' not found in '$1'"
|
error "'$2' not found in '$1'"
|
||||||
|
cat $1
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
error() { echo -e "\\e[31m✗ $*\\e[0m"; }
|
error() { echo -e "\\e[31m✗ $*\\e[0m"; }
|
||||||
|
|
||||||
if [ ! -f $1 ]; then
|
if [ ! -f $1 ]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue