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

Add flag to recordIssues to use exit codes instead of setting result directly on the build

    • Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Icon: Major Major
    • warnings-ng-plugin
    • None

      It would be useful to have recordIssues not directly set a build's result via the groovy object but have it return an exit code. As of now, the complete build and not just the stage in particular is marked as unstable or failure if the quality gate is breached. By using exit codes, the user could handle the result with a try / catch clause if wanted.

       

      In our usecase, we publish the check results to GitHub. In GitHub, we can then configure more granular if a stage is required or not.

          [JENKINS-71448] Add flag to recordIssues to use exit codes instead of setting result directly on the build

          Ulli Hafner added a comment -

          I think the plugin does not set the build status in pipelines anyway. It creates a WarningAction that is interpreted in pipelines as a failure of a specific step. Example output:

          Can you simply read those results on your own? (Or use the existing return value of the step?)

          Ulli Hafner added a comment - I think the plugin does not set the build status in pipelines anyway. It creates a WarningAction that is interpreted in pipelines as a failure of a specific step. Example output: Can you simply read those results on your own? (Or use the existing return value of the step?)

          Ulli Hafner added a comment -

          I think this can be done already using the returned model objects.

          Ulli Hafner added a comment - I think this can be done already using the returned model objects.

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

              Created:
              Updated:
              Resolved: