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

Change of behaviour on tooling naming following custom icon feature

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • warnings-ng-plugin
    • None
    • v12.2.0 of warnings-ng

      Before the release of v12.2.0

      and possibly due to https://github.com/jenkinsci/warnings-ng-plugin/pull/1919

       

      the following call :

      recordIssues(failOnError: false, enabledForFailure: true, aggregatingResults: false,
          tools:[checkStyle(id: hadolintId, pattern: 'reports/hadolint_lint.xml'),
          checkStyle(id: shellcheckId, name: 'ShellCheck' , pattern: 'reports/shellcheck_lint.xml')],
          healthy: 10, unhealthy: 100, qualityGates: [[threshold: 1, type:'NEW_NORMAL', unstable: false]]
          ) 

      would generate a "HadoLint Warnings" report, 

      After v12.2.0 this resulted in a "checkstyle" report, changing the name of  reports to GitHub for example, thus breaking automation.

       

      For now we have this workaround:

       recordIssues(failOnError: false, enabledForFailure: true, aggregatingResults: false,
          tools:[checkStyle(id: hadolintId, name:'HadoLint', pattern: 'reports/hadolint_lint.xml'),
          checkStyle(id: shellcheckId, name: 'ShellCheck' , pattern: 'reports/shellcheck_lint.xml')],
          healthy: 10, unhealthy: 100, qualityGates: [[threshold: 1, type:'NEW_NORMAL', unstable: false]]
          )

      But this means we get the Checkstyle icon. What would be the correct way to fix ? Is there a way to use the new "icon" parameter to point to the static assets icons built-in to the plugin ? (static/a4a43440/plugin/warnings-ng/icons/hadolint-24x24.png)

       

      Thanks,

          [JENKINS-75297] Change of behaviour on tooling naming following custom icon feature

          Edward Nys added a comment -

          Edward Nys added a comment - combined with https://github.com/jenkinsci/warnings-ng-plugin/pull/1918/files

          Ulli Hafner added a comment -

          Hmm interesting, you did get the HadoLint icon by accident because you did choose the ID of the HadoLint parser when calling the CheckStyle parser

          Why don't you invoke HadoLint directly?

          recordIssues(failOnError: false, enabledForFailure: true, aggregatingResults: false,
              tools:[hadoLint(pattern: 'reports/hadolint_lint.xml'),
              checkStyle(id: shellcheckId, name: 'ShellCheck' , pattern: 'reports/shellcheck_lint.xml')],
              healthy: 10, unhealthy: 100, qualityGates: [[threshold: 1, type:'NEW_NORMAL', unstable: false]]
              ) 

          Ulli Hafner added a comment - Hmm interesting, you did get the HadoLint icon by accident because you did choose the ID of the HadoLint parser when calling the CheckStyle parser Why don't you invoke HadoLint directly? recordIssues(failOnError: false , enabledForFailure: true , aggregatingResults: false ,     tools:[hadoLint(pattern: 'reports/hadolint_lint.xml' ),     checkStyle(id: shellcheckId, name: 'ShellCheck' , pattern: 'reports/shellcheck_lint.xml' )],     healthy: 10, unhealthy: 100, qualityGates: [[threshold: 1, type: 'NEW_NORMAL' , unstable: false ]]     )

            drulli Ulli Hafner
            enys Edward Nys
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: