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

Is it possible to configure the color of the job (success or not) depending on the error number of one parser

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • warnings-plugin
    • None
    • jenkins 2.121.2 + warning plug-in version 5.X (beta)
    • 5.0.0-beta3

      currently it is possible to configure the success or not of a job depending on the total error number parsed by all parsers.

       

      Is it possible to do the same but using only one parser.

       

      Because it is possible that some other parser generates error/warning that should not impact the status of the job. for instance rulecheck.

      whereas the main process has a separate parser where error are very important and we want only these error to mark the job as failed.

          [JENKINS-53644] Is it possible to configure the color of the job (success or not) depending on the error number of one parser

          Ulli Hafner added a comment -

          This is already possible, yes. Are you using Pipelines? Then you simply need to add a step for each parser.

          Ulli Hafner added a comment - This is already possible, yes. Are you using Pipelines? Then you simply need to add a step for each parser.

          iostrym added a comment -

          Hello,

           

          No i'm not using pipelines. I have only one job with about 10 parsers. Do I need to modify my job to use pipelines or it there another way to do this without using pipelines ?

          iostrym added a comment - Hello,   No i'm not using pipelines. I have only one job with about 10 parsers. Do I need to modify my job to use pipelines or it there another way to do this without using pipelines ?

          Ulli Hafner added a comment -

          I think it is possible with freestyle jobs as well. You need to install a plugin that allows to execute a post build action multiple times. (Conditional BuildStep Plugin or Postbuild script, I never used them on my own).

          Ulli Hafner added a comment - I think it is possible with freestyle jobs as well. You need to install a plugin that allows to execute a post build action multiple times. (Conditional BuildStep Plugin or Postbuild script, I never used them on my own).

          iostrym added a comment -

          thanks. I will try it. using your proposal it seems I may need to use warning plugin as a script, right ?

           

          Because plugin proposals are plugin to execute post build script.

          iostrym added a comment - thanks. I will try it. using your proposal it seems I may need to use warning plugin as a script, right ?   Because plugin proposals are plugin to execute post build script.

          Ulli Hafner added a comment -

          Ulli Hafner added a comment - I think you need https://wiki.jenkins.io/display/JENKINS/Flexible+Publish+Plugin

          iostrym added a comment -

          Thanks a lot. I tried it and I successfully launch a second time your warning plugin.

           

          then I configure the second warning plugin using Quality Gate Thresholds and I have a problem because I can only set threshold for :

          Severity High / normal / low

          And it seems that it correspond only to WARNING_HIGH, WARNING_NORMAL, WARNING_LOW severity.

          And I don't succeed to make my job failing when I have at least one ERROR.

          Is it normal ?  

          My parser only generates warning with severity : "Low" or "Error".

          Is it possible to use Quality Gate Thresholds on "Error" severity ? Because if I'm correct, Severity High is WARNING_HIGH and not Error. Am I correct ?
           

          iostrym added a comment - Thanks a lot. I tried it and I successfully launch a second time your warning plugin.   then I configure the second warning plugin using Quality Gate Thresholds and I have a problem because I can only set threshold for : Severity High / normal / low And it seems that it correspond only to WARNING_HIGH, WARNING_NORMAL, WARNING_LOW severity. And I don't succeed to make my job failing when I have at least one ERROR. Is it normal ?   My parser only generates warning with severity : "Low" or "Error". Is it possible to use Quality Gate Thresholds on "Error" severity ? Because if I'm correct, Severity High is WARNING_HIGH and not Error. Am I correct ?  

          Ulli Hafner added a comment -

          You are right. I added errors in the 5.x release, however did not yet use it in ever place. This needs to be added to the quality gate as well. Can you please create a new issue?

          Ulli Hafner added a comment - You are right. I added errors in the 5.x release, however did not yet use it in ever place. This needs to be added to the quality gate as well. Can you please create a new issue?

          iostrym added a comment -

          done, thanks.

          iostrym added a comment - done, thanks.

            drulli Ulli Hafner
            iostrym iostrym
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: