SonarQube 통합
SonarQube 통합 (SonarQube)
SonarQube 통합을 사용하면 SonarQube 프로젝트를 Catalog Classic 서비스에 직접 연결할 수 있어요. 같은 서드파티 제공자에 대한 연결을 여러 개 포함해 통합 인스턴스를 여러 개 구성할 수도 있어요. Konnect UI, API, Terraform을 통해 SonarQube 개인 액세스 토큰으로 인증하는 방법을 단계별로 안내해요
출처: 문서
본문
지금 보고 계신 문서는 Catalog Classic 문서예요. 새로운 Catalog 경험을 보려면 Catalog 문서를 확인하세요.
SonarQube 통합을 사용하면 SonarQube 프로젝트를 Catalog Classic 서비스에 직접 연결할 수 있어요. 이 통합은 여러 인스턴스로 구성할 수 있고, 여기에는 같은 서드파티 공급자에 대한 여러 연결도 포함돼요.
전체 튜토리얼은 다음을 참고하세요:
- Konnect UI로 Catalog Classic의 SonarQube 프로젝트 모니터링하기
- Konnect API로 Catalog Classic의 SonarQube 프로젝트 모니터링하기
사전 준비
SonarQube SaaS에서 다음을 구성해야 해요:
SonarQube Server는 지원되지 않아요.
SonarQube 통합 인증하기
UI
- Konnect 사이드바에서 Catalog를 클릭하세요.
- Catalog 사이드바에서 Integrations를 클릭하세요.
- SonarQube를 클릭하세요.
- Add SonarQube instance를 클릭하세요.
- SonarQube API key 필드에 SonarQube 개인 액세스 토큰을 입력하세요.
- Display name 필드에 SonarQube 인스턴스 이름을 입력하세요.
- Instance name 필드에 SonarQube 인스턴스의 고유 식별자를 입력하세요.
- Save를 클릭하세요.
API
먼저 SonarQube 통합을 설치하세요:
curl -X POST "https://us.api.konghq.com/v1/integration-instances" \
--no-progress-meter --fail-with-body \
-H "Authorization: Bearer $KONNECT_TOKEN" \
--json '{
"integration_name": "sonarqube",
"name": "sonarqube",
"display_name": "SonarQube",
"config": null
}'
SonarQube 통합의 ID를 내보내세요:
export SONARQUBE_INTEGRATION_ID='YOUR-INTEGRATION-ID'
다음으로, SonarQube 개인 액세스 토큰으로 SonarQube 통합을 인증하세요:
curl -X POST "https://us.api.konghq.com/v1/integration-instances/$SONARQUBE_INTEGRATION_ID/auth-credential" \
--no-progress-meter --fail-with-body \
-H "Authorization: Bearer $KONNECT_TOKEN" \
--json '{
"type": "multi_key_auth",
"config": {
"headers": [
{
"name": "authorization",
"key": "'$SONARQUBE_PAT'"
}
]
}
}'
Terraform
konnect_integration_instance 및 konnect_integration_instance_auth_credential 리소스를 사용하세요:
echo '
resource "konnect_integration_instance" "my_integrationinstance" {
name = "sonarqube"
display_name = "SonarQube"
integration_name = "sonarqube"
}
resource "konnect_integration_instance_auth_credential" "my_integrationinstanceauthcredential" {
integration_instance_id = konnect_integration_instance.my_integrationinstance.id
multi_key_auth = {
config = {
"headers": [
{
"name": "authorization",
"key": "'$SONARQUBE_PAT'"
}
]
}
}
}
' >> main.tf
리소스
사용 가능한 SonarQube 리소스:
SonarQube 프로젝트에 대한 직접 매핑
설명: SonarQube Cloud 프로젝트에 연결된 퍼블릭 또는 프라이빗 리포지토리의 코드 이슈를 확인할 수 있게 해줘요.
디스커버리 정보
- 이 통합은 자동 리소스 디스커버리를 지원해요
- 리소스 타입: Projects
관련 리소스
더 알아보기 (Learn more)
- 새로운 Catalog 환경의 전체 문서를 확인해요 — Catalog documentation
- Konnect UI로 SonarQube 프로젝트를 모니터링하는 튜토리얼이에요 — Monitor SonarQube projects Catalog Classic with the Konnect UI
- Konnect API로 SonarQube 프로젝트를 모니터링하는 튜토리얼이에요 — Monitor SonarQube projects Catalog Classic with the Konnect API
- Catalog Classic의 기본 개념과 사용 방법을 살펴봐요 — Catalog Classic