-
Notifications
You must be signed in to change notification settings - Fork 0
SonarCloud Code Quality and Code Security
Lyes S edited this page Jun 4, 2022
·
7 revisions
Table Of Contents
- Please refer to the official documentation available at https://docs.sonarcloud.io/
- Please refer to the official documentation available at https://docs.sonarcloud.io/getting-started/github/
- Analyze projects - Select repositories (including Organization Import/Creation)
- Navigate to Administration > Analysis Method & Deactivate SonarCloud Automatic Analysis
- Please refer to .circleci/config.yml for more information
orbs:
sonarcloud: sonarsource/[email protected]
jobs:
sonar-cloud:
parameters:
image:
type: string
default: cimg/openjdk:11.0.13
command:
type: string
docker:
- image: <<parameters.image>>
steps:
- checkout
- run:
name: Analyze on SonarCloud
command: <<parameters.command>>
- Please refer to the official documentation available at https://circleci.com/docs/2.0/contexts/ regarding the context usage
workflows:
network-device-inventory-development-workflow:
jobs:
- sonar-cloud:
name: sonar-cloud-inventory
command: mvn verify sonar:sonar -Dsonar.projectKey=$PROJECT_KEY -Dsonar.host.url=$HOST_URL -Dsonar.organization=$ORGANIZATION
context:
- SonarCloud
network-device-inventory-release-workflow:
jobs:
- sonar-cloud:
name: sonar-cloud-inventory
command: mvn verify sonar:sonar -Dsonar.projectKey=$PROJECT_KEY -Dsonar.host.url=$HOST_URL -Dsonar.organization=$ORGANIZATION
context:
- SonarCloud
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
"The higher we soar the smaller we appear to those who cannot fly."
[Friedrich Nietzsche]