devops:sonarqube
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| devops:sonarqube [2023/11/01 07:15] – removed - external edit (Unknown date) 127.0.0.1 | devops:sonarqube [2023/11/01 07:15] (current) – ↷ Page moved from camunda:devops:sonarqube to devops:sonarqube skipidar | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ===== Sonarqube ===== | ||
| + | The sonarqube is the static code analysis tool. | ||
| + | |||
| + | |||
| + | === Jenkins === | ||
| + | |||
| + | |||
| + | |||
| + | == Scan== | ||
| + | |||
| + | === In Jenkins === | ||
| + | To scan the code use the Jenkins plugin " | ||
| + | |||
| + | === via console === | ||
| + | https:// | ||
| + | |||
| + | |||
| + | == Break build== | ||
| + | |||
| + | To break the build, when the sonarqube-project " | ||
| + | |||
| + | < | ||
| + | # | ||
| + | CURL='/ | ||
| + | RVMHTTP=" | ||
| + | CURLARGS=" | ||
| + | |||
| + | # you can store the result in a variable | ||
| + | raw=" | ||
| + | |||
| + | if [[ $raw = *" | ||
| + | exit 1 | ||
| + | else | ||
| + | exit 0 | ||
| + | fi | ||
| + | </ | ||
| + | |||
| + | Here we can retrieve the project key by using the following api: | ||
| + | < | ||
| + | curl -u adop: | ||
| + | |||
| + | |||
| + | [{" | ||
| + | </ | ||
| + | |||
| + | The next step is the request of the project state | ||
| + | < | ||
| + | curl -u adop: | ||
| + | |||
| + | |||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ], | ||
| + | " | ||
| + | | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ] | ||
| + | } | ||
| + | } | ||
| + | </ | ||
