Panel | ||||
---|---|---|---|---|
| ||||
|
개요 | Overview
A quality gate is the best way to enforce a quality policy in your organization. It's there to answer ONE question : can I deliver my project to production today or not ?
In order to answer this question, you define a set of Boolean conditions based on measure thresholds against which projects are measured. For example:
- No new blocker issues
- Code coverage on new code greater than 80%
- Etc.
Ideally, all projects will be verified against the same quality gate, but that's not always practical. For instance, you may find that:
- Technological implementation differs from one application to another (you might not require the same code coverage on new code for Web or Java applications).
- You want to ensure stronger requirements on some of your applications (internal frameworks for example).
- Etc.
Which is why you can define as many quality gates as you wish. Quality Gates are defined and managed in the Quality Gates page found in the top menu품질 게이트(Quality Gate)는 조직 관점에서 품질 정책을 적용하는 최적의 방법입니다. 품질 게이트를 사용해 다음의 질문에 답할 수 있습니다:
- 이 프로젝트를 오늘 릴리즈할 수 있는가? 없는가?
이 질문에 답하기 위해, 프로젝트의 지표들을 기준으로 일련의 참/거짓 조건을 정의합니다. 예를 들면:
- 새로운 blocker 이슈 없음
- 신규 코드에 대한 code coverage가 80% 이상
- 기타
이상적인 경우, 모든 프로젝트의 품질 게이트가 동일하겠지만 현실적으로는 그렇지 않을 수 있습니다:
- 각 프로젝트의 기술적인 구현이 다른 경우(웹 어플리케이션, 자바 어플리케이션의 신규 코드의 코드 커버리지 요구가 동일하지 않을 수 있습니다)
- 특정 프로젝트에 보다 강력한 품질 요구사항을 적용하는 경우(예를 들면, 내부 프레임워크 등)
- 기타
탑 메뉴의 Quality Gates 페이지로 이동해, 원하는 만큼의 품질 게이트를 자유롭게 생성/사용/관리할 수 있습니다.
Use the Best Quality Gate Configuration
The quality gate "SonarQube way" is provided by SonarSource and activated by default. It represents our view of the best way to implement the Fixing the Water Leak concept. At each SonarQube release, we adjust this default quality gate according to SonarQube's capabilities.
With SonarQube 6.2 comes three new metrics allowing you to enforce a given Rating of Reliability, Security and Maintainability, not just overall but also on new code. These new metrics are now recommended and come as part of the default quality gate. We strongly advise you to adjust your own quality gates to use them to make feedback more clear to your developers looking at their quality gate on their project page.
Don't forget also that quality gate conditions must use differential values. There is no point for example to check an absolute value such as : Number of Lines of Code is greater than 1000.
Recommended Quality Gate
Quality Gate Status
The current status is displayed prominently at the top of the Project Page :
Getting Notified When a Quality Gate Fails
Thanks to the notification mechanism, users can be notified when a quality gate fails. To do so, subscribe to the New quality gate status notification either for all projects or a set of projects you're interested in.
Security
Quality Gates can be accessed by any user (even anonymous users). All users can view every aspect of a quality gate.
To make changes (create, edit or delete) users must be granted the Administer Quality Profiles and Gates permission.
A project administrator can choose which quality gates his/her project is associated with. See Project Settings for more.
Defining Quality Gates
To manage quality gates, go to Quality Gates (top menu bar).
Each Quality Gate condition is a combination of :
- measure
- period: Value (to date) or Leak (differential value over the Leak period)
- comparison operator
- warning value (optional)
- error value (optional)
For instance, a condition might be:
- measure: Blocker issue
- period: Value
- comparison operator: >
- error value: 0
Which can be stated as: No blocker issues.