Skip to content

Commit

Permalink
feat(plugins): sonar plugin added
Browse files Browse the repository at this point in the history
sonar plugin added

BREAKING CHANGE:
ARC-101
  • Loading branch information
sadarunnisa-sf committed Aug 19, 2024
1 parent e810319 commit 4ef0518
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 4 deletions.
4 changes: 4 additions & 0 deletions app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ proxy:
headers:
User-Agent: tech-services/backstage-plugin/1.0
Authorization: token ${SNYK_TOKEN}
'/sonarqube':
target: https://sonarcloud.io/api
allowedMethods: ['GET']
auth: "${SONARCLOUD_TOKEN}:"

catalog:
# providers:
Expand Down
5 changes: 3 additions & 2 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"cy:run": "cypress run --browser chrome"
},
"dependencies": {
"@backstage-community/plugin-sonarqube": "^0.8.0",
"@backstage/app-defaults": "^1.3.1",
"@backstage/catalog-model": "^1.3.0",
"@backstage/cli": "^0.22.7",
Expand Down Expand Up @@ -52,10 +53,10 @@
"history": "^5.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-idle-timer": "^5.7.2",
"react-router": "6.11.2",
"react-router-dom": "6.11.2",
"react-use": "^17.2.4",
"react-idle-timer": "^5.7.2"
"react-use": "^17.2.4"
},
"devDependencies": {
"@backstage/test-utils": "^1.3.1",
Expand Down
5 changes: 4 additions & 1 deletion packages/app/src/components/catalog/EntityPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import {
EntityGithubPullRequestsOverviewCard,
} from '@roadiehq/backstage-plugin-github-pull-requests';
import { SnykOverview, EntitySnykContent, isSnykAvailable } from 'backstage-plugin-snyk';

import { EntitySonarQubeCard } from '@backstage-community/plugin-sonarqube';

const techdocsContent = (
<EntityTechdocsContent>
Expand Down Expand Up @@ -185,6 +185,9 @@ const serviceEntityPage = (
<EntityLayout.Route path="/snyk" title="Security">
<EntitySnykContent />
</EntityLayout.Route>
<EntityLayout.Route path="/codequality" title="Code Quality">
<EntitySonarQubeCard />
</EntityLayout.Route>
<EntityLayout.Route
path="/pull-requests"
title="Pull Requests"
Expand Down
4 changes: 3 additions & 1 deletion terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ Deployment of Backstage to an ECS Cluster
| Name | Type |
|------|------|
| [aws_route53_zone.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/route53_zone) | data source |
| [aws_ssm_parameter.container_image](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ssm_parameter) | data source |
| [aws_ssm_parameter.container_image](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ssm_parameter) |
data source |
| [aws_ssm_parameter.sonarcloud_token](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ssm_parameter) data source |
| [aws_ssm_parameter.repo_name](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ssm_parameter) | data source |
| [aws_subnets.private](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnets) | data source |
| [aws_subnets.public](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/subnets) | data source |
Expand Down
4 changes: 4 additions & 0 deletions terraform/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ data "aws_subnets" "private" {
data "aws_ssm_parameter" "repo_name" {
name = "/backstage/${var.environment}/repo/creator/name"
}

data "aws_ssm_parameter" "sonarcloud_token" {
name = "/backstage/${var.environment}/sonarcloud/token"
}
4 changes: 4 additions & 0 deletions terraform/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@ locals {
name = "REPO_CREATOR_TEAM"
value = data.aws_ssm_parameter.repo_name.value
},
{
name = "SONARCLOUD_TOKEN"
value = data.aws_ssm_parameter.sonarcloud_token.value
},
]
}

0 comments on commit 4ef0518

Please sign in to comment.