docs: update plugin installation docs
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -13,14 +13,7 @@ The SonarQube Plugin displays code statistics from [SonarCloud](https://sonarclo
|
||||
yarn add @backstage/plugin-sonarqube
|
||||
```
|
||||
|
||||
2. Add plugin to the app:
|
||||
|
||||
```js
|
||||
// packages/app/src/plugins.ts
|
||||
export { plugin as SonarQube } from '@backstage/plugin-sonarqube';
|
||||
```
|
||||
|
||||
3. Add the `EntitySonarQubeCard` to the EntityPage:
|
||||
2. Add the `EntitySonarQubeCard` to the EntityPage:
|
||||
|
||||
```diff
|
||||
// packages/app/src/components/catalog/EntityPage.tsx
|
||||
@@ -40,7 +33,7 @@ export { plugin as SonarQube } from '@backstage/plugin-sonarqube';
|
||||
);
|
||||
```
|
||||
|
||||
4. Add the proxy config:
|
||||
3. Add the proxy config:
|
||||
|
||||
Provide a method for your Backstage backend to get to your SonarQube API end point. Add configuration to your `app-config.yaml` file depending on the product you use.
|
||||
|
||||
@@ -77,16 +70,16 @@ sonarQube:
|
||||
baseUrl: https://your.sonarqube.instance.com
|
||||
```
|
||||
|
||||
5. Get and provide `SONARQUBE_AUTH` as an env variable (https://sonarcloud.io/account/security or https://docs.sonarqube.org/latest/user-guide/user-token/)
|
||||
4. Get and provide `SONARQUBE_AUTH` as an env variable (https://sonarcloud.io/account/security or https://docs.sonarqube.org/latest/user-guide/user-token/)
|
||||
|
||||
6. Run the following commands in the root folder of the project to install and compile the changes.
|
||||
5. Run the following commands in the root folder of the project to install and compile the changes.
|
||||
|
||||
```yaml
|
||||
yarn install
|
||||
yarn tsc
|
||||
```
|
||||
|
||||
7. Add the `sonarqube.org/project-key` annotation to the `catalog-info.yaml` file of the target repo for which code quality analysis is needed.
|
||||
6. Add the `sonarqube.org/project-key` annotation to the `catalog-info.yaml` file of the target repo for which code quality analysis is needed.
|
||||
|
||||
```yaml
|
||||
apiVersion: backstage.io/v1alpha1
|
||||
|
||||
Reference in New Issue
Block a user