mirror of
https://github.com/kitabisa/sonarqube-action.git
synced 2025-11-01 22:04:20 +08:00
Merge pull request #6 from nordcloud/master
Add project identity parameters
This commit is contained in:
commit
63ca4c2787
@ -37,6 +37,8 @@ uses: kitabisa/sonarqube-action@master
|
|||||||
with:
|
with:
|
||||||
projectBaseDir: my-custom-directory
|
projectBaseDir: my-custom-directory
|
||||||
projectKey: my-custom-project
|
projectKey: my-custom-project
|
||||||
|
projectName: "my-project-name"
|
||||||
|
projectVersion: "my-project-version"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Secrets
|
## Secrets
|
||||||
|
|||||||
@ -15,6 +15,14 @@ inputs:
|
|||||||
description: "The project's unique key. Allowed characters are: letters, numbers, -, _, . and :, with at least one non-digit."
|
description: "The project's unique key. Allowed characters are: letters, numbers, -, _, . and :, with at least one non-digit."
|
||||||
required: false
|
required: false
|
||||||
default: ""
|
default: ""
|
||||||
|
projectName:
|
||||||
|
description: "Name of the project that will be displayed on the web interface."
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
|
projectVersion:
|
||||||
|
description: "The project version."
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
projectBaseDir:
|
projectBaseDir:
|
||||||
description: "Set the sonar.projectBaseDir analysis property"
|
description: "Set the sonar.projectBaseDir analysis property"
|
||||||
required: false
|
required: false
|
||||||
|
|||||||
@ -12,10 +12,15 @@ fi
|
|||||||
|
|
||||||
[[ ! -z ${INPUT_PASSWORD} ]] && SONAR_PASSWORD="${INPUT_PASSWORD}" || SONAR_PASSWORD=""
|
[[ ! -z ${INPUT_PASSWORD} ]] && SONAR_PASSWORD="${INPUT_PASSWORD}" || SONAR_PASSWORD=""
|
||||||
[[ -z ${INPUT_PROJECTKEY} ]] && SONAR_PROJECTKEY="${PWD##*/}" || SONAR_PROJECTKEY="${INPUT_PROJECTKEY}"
|
[[ -z ${INPUT_PROJECTKEY} ]] && SONAR_PROJECTKEY="${PWD##*/}" || SONAR_PROJECTKEY="${INPUT_PROJECTKEY}"
|
||||||
|
[[ -z ${INPUT_PROJECTNAME} ]] && SONAR_PROJECTNAME="${PWD##*/}" || SONAR_PROJECTNAME="${INPUT_PROJECTNAME}"
|
||||||
|
[[ -z ${INPUT_PROJECTVERSION} ]] && SONAR_PROJECTVERSION="" || SONAR_PROJECTVERSION="${INPUT_PROJECTVERSION}"
|
||||||
|
|
||||||
|
|
||||||
sonar-scanner \
|
sonar-scanner \
|
||||||
-Dsonar.host.url=${INPUT_HOST} \
|
-Dsonar.host.url=${INPUT_HOST} \
|
||||||
-Dsonar.projectKey=${SONAR_PROJECTKEY} \
|
-Dsonar.projectKey=${SONAR_PROJECTKEY} \
|
||||||
|
-Dsonar.projectName=${SONAR_PROJECTNAME} \
|
||||||
|
-Dsonar.projectVersion=${SONAR_PROJECTVERSION} \
|
||||||
-Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR} \
|
-Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR} \
|
||||||
-Dsonar.login=${INPUT_LOGIN} \
|
-Dsonar.login=${INPUT_LOGIN} \
|
||||||
-Dsonar.password=${INPUT_PASSWORD} \
|
-Dsonar.password=${INPUT_PASSWORD} \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user