Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-61392] Make issues in modified code visible #1669

Merged
merged 28 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8c97e58
[JENKINS-72059] Add new quality gate options to alter the stage only.
uhafner Dec 29, 2023
afb3d2a
Fix some tests.
uhafner Jan 1, 2024
69d72f5
Make API method of quality result accessible.
uhafner Jan 2, 2024
58afecf
Fix reference of old quality gate status.
uhafner Jan 2, 2024
0ec09b2
Fix quality gate definition in Job DSL.
uhafner Jan 2, 2024
1b37074
Fix quality gates in remote API.
uhafner Jan 2, 2024
b840867
Add integer based setter fpr threshold.
uhafner Jan 2, 2024
a8614a1
Add integer based setter for threshold.
uhafner Jan 2, 2024
9ddcf8c
Fix new quality gates in UI test.
uhafner Jan 3, 2024
e998875
Fix enum values.
uhafner Jan 3, 2024
fbe68be
Fix enum values for pipelines.
uhafner Jan 3, 2024
96a63ca
Add integer based threshold.
uhafner Jan 4, 2024
7c345c7
Add integer based threshold to quality gate.
uhafner Jan 4, 2024
d1f0abe
Add an integer-based threshold for quality gates.
uhafner Jan 4, 2024
96f31be
Fix order in assertion.
uhafner Jan 4, 2024
6290cee
Use new data-bound properties of QualityGate.
uhafner Jan 6, 2024
f7a00f8
Use new output of snippet generator.
uhafner Jan 6, 2024
33ce1b8
Remove deprecated code.
uhafner Jan 10, 2024
ae9c8fe
Merge remote-tracking branch 'origin/main' into remove-deprecated
uhafner Jan 12, 2024
cc2f21e
Remove global configuration of source paths.
uhafner Jan 12, 2024
d1fad88
Remove source directory.
uhafner Jan 12, 2024
e4b3c2f
Remove source directory.
uhafner Jan 12, 2024
c9e0b4a
Restore totals field when `null`.
uhafner Jan 13, 2024
16139ca
Remove test for old serialization.
uhafner Jan 15, 2024
8f0571f
[JENKINS-58167] Use source code retention strategy of Prism.
uhafner Jan 12, 2024
7422834
ZIP all source files before copying into build folder.
uhafner Jan 13, 2024
9320d92
Make issues in modified code visible.
uhafner Jan 26, 2024
a30f12e
Add a pie chart that shows the issues in modified code.
uhafner Jan 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 48 additions & 16 deletions .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
java-version: '21'
check-latest: true
cache: 'maven'
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.9.6
- name: Build warnings plugin and download dependencies
run: mvn -V --color always -ntp verify -Pskip --file plugin/pom.xml -Dgpg.skip
- name: Run UI tests for the details tabs
Expand All @@ -33,13 +37,17 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
java-version: '21'
check-latest: true
cache: 'maven'
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.9.6
- name: Build warnings plugin and download dependencies
run: mvn -V --color always -ntp verify -Pskip --file plugin/pom.xml -Dgpg.skip
- name: Run UI tests for the dashboard view
Expand All @@ -53,13 +61,17 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
java-version: '21'
check-latest: true
cache: 'maven'
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.9.6
- name: Build warnings plugin and download dependencies
run: mvn -V --color always -ntp verify -Pskip --file plugin/pom.xml -Dgpg.skip
- name: Run UI tests for the freestyle configuration
Expand All @@ -73,13 +85,17 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
java-version: '21'
check-latest: true
cache: 'maven'
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.9.6
- name: Build warnings plugin and download dependencies
run: mvn -V --color always -ntp verify -Pskip --file plugin/pom.xml -Dgpg.skip
- name: Run UI tests for the pipeline snippet configurator
Expand All @@ -93,13 +109,17 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
java-version: '21'
check-latest: true
cache: 'maven'
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.9.6
- name: Build warnings plugin and download dependencies
run: mvn -V --color always -ntp verify -Pskip --file plugin/pom.xml -Dgpg.skip
- name: Run UI tests for Jenkins' global configuration
Expand All @@ -113,13 +133,17 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
java-version: '21'
check-latest: true
cache: 'maven'
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.9.6
- name: Build warnings plugin and download dependencies
run: mvn -V --color always -ntp verify -Pskip --file plugin/pom.xml -Dgpg.skip
- name: Run UI tests for the issues column
Expand All @@ -133,13 +157,17 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
java-version: '21'
check-latest: true
cache: 'maven'
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.9.6
- name: Build warnings plugin and download dependencies
run: mvn -V --color always -ntp verify -Pskip --file plugin/pom.xml -Dgpg.skip
- name: Run UI tests for the trend charts
Expand All @@ -153,13 +181,17 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
java-version: '21'
check-latest: true
cache: 'maven'
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.9.6
- name: Build warnings plugin and download dependencies
run: mvn -V --color always -ntp verify -Pskip --file plugin/pom.xml -Dgpg.skip
- name: Run miscellaneous UI tests of the warnings plugin
Expand Down
5 changes: 2 additions & 3 deletions doc/Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,11 @@ the number of issues that will fail a given quality gate.
An example pipeline with these options is shown in the following snippet:

```groovy
recordIssues tool: java(pattern: '*.log'), qualityGates: [[threshold: 1, type: 'TOTAL', unstable: true]]
recordIssues tool: java(pattern: '*.log'), qualityGates: [[threshold: 1, type: 'TOTAL', criticality: 'FAILURE']]
```

The type determines the property that will be picked to evaluate the quality gate. Refer to the enum
[QualityGateType](../plugin/src/main/java/io/jenkins/plugins/analysis/core/util/QualityGate.java) to see which different
types are supported.
[QualityGateType](../plugin/src/main/java/io/jenkins/plugins/analysis/core/util/WarningsQualityGate.java) to see which different types are supported.

### Health report configuration

Expand Down
69 changes: 42 additions & 27 deletions plugin/pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-pom</artifactId>
<version>6.17.0</version>
<relativePath />
<version>7.0.0</version>
<relativePath/>
</parent>

<groupId>io.jenkins.plugins</groupId>
Expand All @@ -21,18 +22,16 @@
<url>https://github.com/jenkinsci/warnings-ng-plugin</url>

<properties>
<revision>10.8.0</revision>
<revision>11.0.0</revision>
<changelist>-SNAPSHOT</changelist>
<module.name>${project.groupId}.warnings.ng</module.name>

<analysis-model-api.version>11.14.0</analysis-model-api.version>
<analysis-model-tests.version>${analysis-model-api.version}</analysis-model-tests.version>
<analysis-model-api.version>11.20.0-rc789.31c8340705ef</analysis-model-api.version>
<analysis-model-tests.version>11.6.0</analysis-model-tests.version>
<pull-request-monitoring.version>1.7.8</pull-request-monitoring.version>

<eclipse-collections.version>9.2.0</eclipse-collections.version>

<json.version>20231013</json.version>

<!-- Test Library Dependencies Versions -->
<xmlunit.version>2.9.1</xmlunit.version>
<jsoup.version>1.17.2</jsoup.version>
Expand All @@ -47,11 +46,15 @@
<flexible-publish.version>0.15.2</flexible-publish.version>
<form-element-path.version>1.11</form-element-path.version>

<!-- Maven Surefire ArgLine -->
<argLine>-Djava.awt.headless=true -Xmx1024m -Djenkins.test.timeout=1000 --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED</argLine>

<prism-api.version>1.29.0-8</prism-api.version>
<plugin-util-api.version>3.9.0-rc856.7a_4b_8d226cb_2</plugin-util-api.version>
<forensics-api.version>2.4.0-rc1530.ccd6a_b_012b_c7</forensics-api.version>

<!-- Maven Surefire ArgLine -->
<argLine>-Djava.awt.headless=true -Xmx1024m -Djenkins.test.timeout=1000 --add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens
java.base/java.util.concurrent=ALL-UNNAMED
</argLine>
</properties>

<licenses>
Expand Down Expand Up @@ -86,6 +89,12 @@
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>${json-smart.version}</version>
<exclusions>
<exclusion>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
Expand All @@ -102,6 +111,7 @@
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>plugin-util-api</artifactId>
<version>${plugin-util-api.version}</version>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
Expand Down Expand Up @@ -169,6 +179,11 @@
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>forensics-api</artifactId>
<version>${forensics-api.version}</version>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>json-api</artifactId>
</dependency>

<!-- AxivionSuite Dependencies -->
Expand All @@ -181,9 +196,8 @@
<artifactId>apache-httpcomponents-client-4-api</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
<groupId>io.jenkins.plugins</groupId>
<artifactId>gson-api</artifactId>
</dependency>

<!-- Optional Jenkins Plug-in Dependencies -->
Expand Down Expand Up @@ -282,12 +296,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>${json.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness-tools</artifactId>
Expand All @@ -314,6 +322,7 @@
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>plugin-util-api</artifactId>
<version>${plugin-util-api.version}</version>
<scope>test</scope>
<classifier>tests</classifier>
<exclusions>
Expand Down Expand Up @@ -369,6 +378,12 @@
<artifactId>parasoft-findings</artifactId>
<version>10.7.1</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>warnings-ng</artifactId>
<groupId>io.jenkins.plugins</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand Down Expand Up @@ -605,13 +620,13 @@
</plugins>
</build>
</profile>
<profile>
<id>fast</id>
<properties>
<skipTests>true</skipTests>
<skipITs>true</skipITs>
</properties>
</profile>
<profile>
<id>fast</id>
<properties>
<skipTests>true</skipTests>
<skipITs>true</skipITs>
</properties>
</profile>
</profiles>

<scm>
Expand Down
Loading
Loading