Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-15037

Option to consider only stable builds when calculating new warnings

    Details

    • Similar Issues:

      Description

      I'd like an option to only consider stable builds when computing the number of allowed warnings. Justification follows.

      Consider this scenario, where a job is configured to become unstable if the number checkstyle warnings increase by 5 or more compared to the previous build:

      1. The last Jenkins build is stable
      2. A developer commits a failing test and 10 fixed checkstyle issues. The failing test makes the build unstable.
      3. The developer reverts the commit, thus removing the failing test but increasing the number of checkstyle warnings back to the number of warnings in 1, and above the new limit computed in 2. The build is now unstable because of the checkstyle warnings.

      Is there a way to prevent a case like step 3 from failing the build? If not, I'd like the option described above. If you won't have the time to implement this in a near future, I think I could look into it.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/main/java/hudson/plugins/pmd/MavenPmdResultAction.java
          src/main/java/hudson/plugins/pmd/PmdAnnotationsAggregator.java
          src/main/java/hudson/plugins/pmd/PmdMavenResult.java
          src/main/java/hudson/plugins/pmd/PmdMavenResultAction.java
          src/main/java/hudson/plugins/pmd/PmdPublisher.java
          src/main/java/hudson/plugins/pmd/PmdReporter.java
          src/main/java/hudson/plugins/pmd/PmdReporterResult.java
          src/main/java/hudson/plugins/pmd/PmdResult.java
          src/main/java/hudson/plugins/pmd/PmdResultAction.java
          src/main/resources/hudson/plugins/pmd/PmdReporter/config.jelly
          http://jenkins-ci.org/commit/pmd-plugin/fba349e969bfdfaebfdfaa9785dd6b9d4841c88e
          Log:
          JENKINS-15037: Upgrade to new API in order to compute warnings only
          for stable builds (if option is checked).

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/pmd/MavenPmdResultAction.java src/main/java/hudson/plugins/pmd/PmdAnnotationsAggregator.java src/main/java/hudson/plugins/pmd/PmdMavenResult.java src/main/java/hudson/plugins/pmd/PmdMavenResultAction.java src/main/java/hudson/plugins/pmd/PmdPublisher.java src/main/java/hudson/plugins/pmd/PmdReporter.java src/main/java/hudson/plugins/pmd/PmdReporterResult.java src/main/java/hudson/plugins/pmd/PmdResult.java src/main/java/hudson/plugins/pmd/PmdResultAction.java src/main/resources/hudson/plugins/pmd/PmdReporter/config.jelly http://jenkins-ci.org/commit/pmd-plugin/fba349e969bfdfaebfdfaa9785dd6b9d4841c88e Log: JENKINS-15037 : Upgrade to new API in order to compute warnings only for stable builds (if option is checked).
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/main/java/hudson/plugins/warnings/WarningsAnnotationsAggregator.java
          src/main/java/hudson/plugins/warnings/WarningsBuildHistory.java
          src/main/java/hudson/plugins/warnings/WarningsProjectAction.java
          src/main/java/hudson/plugins/warnings/WarningsPublisher.java
          src/main/java/hudson/plugins/warnings/WarningsResult.java
          src/main/resources/hudson/plugins/warnings/WarningsPublisher/config.jelly
          src/test/java/hudson/plugins/warnings/WarningsPublisherTest.java
          http://jenkins-ci.org/commit/warnings-plugin/559c94f82212c265803bd14efa5fe5c3d00f172d
          Log:
          JENKINS-15037: Upgrade to new API in order to compute warnings only
          for stable builds (if option is checked).

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/warnings/WarningsAnnotationsAggregator.java src/main/java/hudson/plugins/warnings/WarningsBuildHistory.java src/main/java/hudson/plugins/warnings/WarningsProjectAction.java src/main/java/hudson/plugins/warnings/WarningsPublisher.java src/main/java/hudson/plugins/warnings/WarningsResult.java src/main/resources/hudson/plugins/warnings/WarningsPublisher/config.jelly src/test/java/hudson/plugins/warnings/WarningsPublisherTest.java http://jenkins-ci.org/commit/warnings-plugin/559c94f82212c265803bd14efa5fe5c3d00f172d Log: JENKINS-15037 : Upgrade to new API in order to compute warnings only for stable builds (if option is checked).
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/main/java/hudson/plugins/checkstyle/CheckStyleMavenResultAction.java
          src/main/resources/hudson/plugins/checkstyle/CheckStylePublisher/config.jelly
          src/main/resources/hudson/plugins/checkstyle/CheckStyleReporter/config.jelly
          http://jenkins-ci.org/commit/checkstyle-plugin/d8c652dc9f5826e7ed72a255b3776b60bca4c0f2
          Log:
          JENKINS-15037: Upgrade to new API in order to compute warnings only
          for stable builds (if option is checked).

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/checkstyle/CheckStyleMavenResultAction.java src/main/resources/hudson/plugins/checkstyle/CheckStylePublisher/config.jelly src/main/resources/hudson/plugins/checkstyle/CheckStyleReporter/config.jelly http://jenkins-ci.org/commit/checkstyle-plugin/d8c652dc9f5826e7ed72a255b3776b60bca4c0f2 Log: JENKINS-15037 : Upgrade to new API in order to compute warnings only for stable builds (if option is checked).
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/main/java/hudson/plugins/tasks/MavenTasksResultAction.java
          src/main/java/hudson/plugins/tasks/TasksAnnotationsAggregator.java
          src/main/java/hudson/plugins/tasks/TasksMavenResult.java
          src/main/java/hudson/plugins/tasks/TasksMavenResultAction.java
          src/main/java/hudson/plugins/tasks/TasksPublisher.java
          src/main/java/hudson/plugins/tasks/TasksReporter.java
          src/main/java/hudson/plugins/tasks/TasksReporterResult.java
          src/main/java/hudson/plugins/tasks/TasksResult.java
          src/main/java/hudson/plugins/tasks/TasksResultAction.java
          src/main/resources/hudson/plugins/tasks/FixedTasksDetail/index.jelly
          http://jenkins-ci.org/commit/tasks-plugin/7fc0ef593e20049dd7f627834945f22ce8d5f6ff
          Log:
          JENKINS-15037: Upgrade to new API in order to compute warnings only
          for stable builds (if option is checked).

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/tasks/MavenTasksResultAction.java src/main/java/hudson/plugins/tasks/TasksAnnotationsAggregator.java src/main/java/hudson/plugins/tasks/TasksMavenResult.java src/main/java/hudson/plugins/tasks/TasksMavenResultAction.java src/main/java/hudson/plugins/tasks/TasksPublisher.java src/main/java/hudson/plugins/tasks/TasksReporter.java src/main/java/hudson/plugins/tasks/TasksReporterResult.java src/main/java/hudson/plugins/tasks/TasksResult.java src/main/java/hudson/plugins/tasks/TasksResultAction.java src/main/resources/hudson/plugins/tasks/FixedTasksDetail/index.jelly http://jenkins-ci.org/commit/tasks-plugin/7fc0ef593e20049dd7f627834945f22ce8d5f6ff Log: JENKINS-15037 : Upgrade to new API in order to compute warnings only for stable builds (if option is checked).
          Hide
          drulli Ulli Hafner added a comment -

          Integrated in Jenkins Analysis Plug-ins (Compile) #609
          JENKINS-15037 Optionally consider only stable builds as reference builds (Revision f73958097bad7344fb12c75d8aa2928572a51c60)
          JENKINS-15037 Added flag to consider stable reference builds only. (Revision e9fbcb2fc9769f9cde9f073be92c39525b64e635)
          JENKINS-15037 Added flag to consider stable reference builds only. (Revision fa56e0b8a18c476e956da4f071daab813cf2d780)

          Result = SUCCESS

          Show
          drulli Ulli Hafner added a comment - Integrated in Jenkins Analysis Plug-ins (Compile) #609 JENKINS-15037 Optionally consider only stable builds as reference builds (Revision f73958097bad7344fb12c75d8aa2928572a51c60) JENKINS-15037 Added flag to consider stable reference builds only. (Revision e9fbcb2fc9769f9cde9f073be92c39525b64e635) JENKINS-15037 Added flag to consider stable reference builds only. (Revision fa56e0b8a18c476e956da4f071daab813cf2d780) Result = SUCCESS

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              davidparsson David Pärsson
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: