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

Expand icons one can use for summaries like already done for badges

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • badge-plugin
    • None
    • Jenkins 1.471

      addBadge(icon, text) works with images at various locations but createSummary(icon) only allows you to use one of the 48x48 icons offered by Jenkins.

      It would be nice if createSummary(icon) could use a similarly expansive set of icons as addBadge(icon, text) can.

          [JENKINS-14523] Expand icons one can use for summaries like already done for badges

          Daniel Kirkdorffer created issue -
          ikedam made changes -
          Issue Type Original: Bug [ 1 ] New: New Feature [ 2 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 145159 ] New: JNJira + In-Review [ 176282 ]
          Christoph Vogtländer made changes -
          Component/s New: badge-plugin [ 23455 ]

          Christoph Vogtländer added a comment - - edited

          This issue also (still) affects the badge plug-in

          createSummary(icon: 'info.gif', id: 'myid', text: "My Text")
          

          creates an image with src="/static/ed98f93d/images/48x48/info.gif" which does not exist

          Christoph Vogtländer added a comment - - edited This issue also (still) affects the badge plug-in createSummary(icon: 'info.gif' , id: 'myid' , text: "My Text" ) creates an image with src="/static/ed98f93d/images/48x48/info.gif" which does not exist
          Mark Waite made changes -
          Component/s Original: groovy-postbuild-plugin [ 15685 ]
          Mark Waite made changes -
          Description Original: manager.addBadge(icon, text) works with images at various locations but manager.createSummary(icon) only allows you to use one of the 48x48 icons offered by Jenkins.

          It would be nice if manager.createSummary(icon) could use a similarly expansive set of icons as manager.addBadge(icon, text) can.
          New: addBadge(icon, text) works with images at various locations but createSummary(icon) only allows you to use one of the 48x48 icons offered by Jenkins.

          It would be nice if createSummary(icon) could use a similarly expansive set of icons as addBadge(icon, text) can.

          Mark Waite added a comment -

          The badge plugin 1.11 supports additional syntax to define the icon for the badge in createSummary. Here is an example Pipeline:

          pipeline {
              agent any
          
              stages {
                  stage('Badge') {
                      steps {
                          addBadge icon: 'symbol-mic plugin-ionicons-api', 
                                   text: 'A microphone', 
                                   link: 'https://issues.jenkins.io/browse/JENKINS-14523'
                      }
                  }
                  stage('Summary') {
                      steps {
                          createSummary icon: 'symbol-mic plugin-ionicons-api', 
                                        text: 'A microphone in the summary'
                      }
                  }
              }
          }
          

          Mark Waite added a comment - The badge plugin 1.11 supports additional syntax to define the icon for the badge in createSummary. Here is an example Pipeline: pipeline { agent any stages { stage( 'Badge' ) { steps { addBadge icon: 'symbol-mic plugin-ionicons-api' , text: 'A microphone' , link: 'https: //issues.jenkins.io/browse/JENKINS-14523' } } stage( 'Summary' ) { steps { createSummary icon: 'symbol-mic plugin-ionicons-api' , text: 'A microphone in the summary' } } } }
          Mark Waite made changes -
          Released As New: https://github.com/jenkinsci/badge-plugin/releases/tag/badge-1.11
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          Yay!  I hope someone can benefit from this.  12 years on from creating the ticket I'm no longer working on a system that uses this plugin.

          Daniel Kirkdorffer added a comment - Yay!  I hope someone can benefit from this.  12 years on from creating the ticket I'm no longer working on a system that uses this plugin.

            wolfs Stefan Wolf
            dankirkd Daniel Kirkdorffer
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: