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

          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 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' } } } }

          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: