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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: warnings-plugin
    • Labels:
      None
    • Environment:
      jenkins 2.121.2 + warning plug-in version 5.X (beta)
    • Similar Issues:
    • Released As:
      5.0.0-beta3

      Description

      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.

        Attachments

          Activity

          Hide
          drulli 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.

          Show
          drulli 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.
          Hide
          iostrym 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 ?

          Show
          iostrym 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 ?
          Hide
          drulli 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).

          Show
          drulli 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).
          Hide
          iostrym 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.

          Show
          iostrym 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.
          Show
          drulli Ulli Hafner added a comment - I think you need https://wiki.jenkins.io/display/JENKINS/Flexible+Publish+Plugin
          Hide
          iostrym 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 ?
           

          Show
          iostrym 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 ?  
          Hide
          drulli 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?

          Show
          drulli 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?
          Hide
          iostrym iostrym added a comment -

          done, thanks.

          Show
          iostrym iostrym added a comment - done, thanks.

            People

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

              Dates

              Created:
              Updated:
              Resolved: