Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "GerritWarningQualityGate"

(Created page with "Steps to create warning quality gate for a repository 1) Go to the relevant repository configure page for example https://ci.eclipse.org/pde/job/eclipse.pde.build-Gerrit/conf...")
 
Line 4: Line 4:
 
2) In the general section, check '''Restrict where this project can be run''' and put '''centos-7''' in '''Label Expression'''
 
2) In the general section, check '''Restrict where this project can be run''' and put '''centos-7''' in '''Label Expression'''
 
  Reason : (See https://bugs.eclipse.org/bugs/show_bug.cgi?id=574232#c7)
 
  Reason : (See https://bugs.eclipse.org/bugs/show_bug.cgi?id=574232#c7)
 +
 
3) Click '''Add post-build action''' button and select '''Compiler warnings and static analysis results'''
 
3) Click '''Add post-build action''' button and select '''Compiler warnings and static analysis results'''
  
Line 22: Line 23:
 
11) You will see that the build has failed or is unstable ( based on step 8).
 
11) You will see that the build has failed or is unstable ( based on step 8).
  
12) Check ECJ warnings - Example -> Eclipse ECJ: 737 warnings  
+
12) Check ECJ warnings - Example -> Eclipse ECJ: 737 warnings  
  
 
13) Go back to configure page and Set the threshold to ('''warning number in step 12 + 1''')
 
13) Go back to configure page and Set the threshold to ('''warning number in step 12 + 1''')
 +
 +
14) Retrigger again, You will see '''quality gate success'''
  
 
After this, any new warning in this repo will result in Unstable or Failed gerrit ( based on 8)
 
After this, any new warning in this repo will result in Unstable or Failed gerrit ( based on 8)

Revision as of 05:14, 16 July 2021

Steps to create warning quality gate for a repository

1) Go to the relevant repository configure page for example https://ci.eclipse.org/pde/job/eclipse.pde.build-Gerrit/configure ( You must be logged in) 2) In the general section, check Restrict where this project can be run and put centos-7 in Label Expression

Reason : (See https://bugs.eclipse.org/bugs/show_bug.cgi?id=574232#c7)

3) Click Add post-build action button and select Compiler warnings and static analysis results

4) In static analysis tool ->Tool , select Eclipse ECJ in the dropdown

5) Click on Advanced below

6) Check Aggregate results of all tools into a single result and Enable recording for failed builds

7) Scroll down and click on Add Quality Gate

8) Let threshold be 1 and Select Unstable or Failed ( depending on what you prefer if warning comes)

9) Click on Save and Apply

10) Retrigger any of the previous gerrit in this repo

11) You will see that the build has failed or is unstable ( based on step 8).

12) Check ECJ warnings - Example -> Eclipse ECJ: 737 warnings

13) Go back to configure page and Set the threshold to (warning number in step 12 + 1)

14) Retrigger again, You will see quality gate success

After this, any new warning in this repo will result in Unstable or Failed gerrit ( based on 8)

Back to the top