• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Jenkins 1.625.3
      Build Trigger Badge Plugin 2.2

      IMHO it would be nice to be able to display the avatar (if available) instead of the "general" user icon for user triggered builds

          [JENKINS-32299] Use avatar icon for user triggered builds

          Hi,
          Just had a look at it, and though I like the idea, I'm not sure how to implement it.
          Because actually, there don't seem to be any standard way to get an avatar in Jenkins.

          Do you have avatars in your Jenkins installations? If so, could you please show some screenshots + ideally the additional plugins you installed to do that?

          Because the solution might also be to put that addition in that plugin since I made the buildtriggerbadge extensible some months ago through an extension point.

          Thanks for the feedback!

          Baptiste Mathus added a comment - Hi, Just had a look at it, and though I like the idea, I'm not sure how to implement it. Because actually, there don't seem to be any standard way to get an avatar in Jenkins. Do you have avatars in your Jenkins installations? If so, could you please show some screenshots + ideally the additional plugins you installed to do that? Because the solution might also be to put that addition in that plugin since I made the buildtriggerbadge extensible some months ago through an extension point . Thanks for the feedback!

          gordin OK, I think I finallly found the right way to do it with https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/View.java#L810

          But I'd really be more content (so that it's confirmed I'm not in the dark) if you could confirm you're indeed using the Avatar Plugin (https://wiki.jenkins-ci.org/display/JENKINS/Avatar+Plugin) or a custom/internal one, since this plugin seems to be the only to ever have implemented that extension point.

          Thanks!

          Baptiste Mathus added a comment - gordin OK, I think I finallly found the right way to do it with https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/View.java#L810 But I'd really be more content (so that it's confirmed I'm not in the dark) if you could confirm you're indeed using the Avatar Plugin ( https://wiki.jenkins-ci.org/display/JENKINS/Avatar+Plugin ) or a custom/internal one, since this plugin seems to be the only to ever have implemented that extension point. Thanks!

          Yes, I'm using the Avatar plug-in. Sorry for omitting this info (I simply forgot that the Avatar is provided by a plug-in and thought it was implemented in Jenkins core). Using UserInfo.avatar should work. Or should I file a new feature request against the Avatar plug-in to implement the buildtriggerbadge extension point?

          Christoph Vogtländer added a comment - Yes, I'm using the Avatar plug-in. Sorry for omitting this info (I simply forgot that the Avatar is provided by a plug-in and thought it was implemented in Jenkins core). Using UserInfo.avatar should work. Or should I file a new feature request against the Avatar plug-in to implement the buildtriggerbadge extension point?

          Christoph Vogtländer added a comment - - edited

          Btw, currently I'm using the groovy post build plug-in to add a avatar badge to CI builds. See attached screenshot (the build is actually triggered by a scm change, the changeset is evaluated to show the avatar badge of every user that contributed code to that build)

          Christoph Vogtländer added a comment - - edited Btw, currently I'm using the groovy post build plug-in to add a avatar badge to CI builds. See attached screenshot (the build is actually triggered by a scm change, the changeset is evaluated to show the avatar badge of every user that contributed code to that build)

          This issue is related to a more generic idea - JENKINS-21923 (Provide icons for build causes) .

          Cause class should have a default icon and provide method to override it by each cause.

          So UserIdCause could use user's avatar as it's icon
          (and each avatar plugin can override the source of the image).

          Łukasz Jąder added a comment - This issue is related to a more generic idea - JENKINS-21923 (Provide icons for build causes) . Cause class should have a default icon and provide method to override it by each cause. So UserIdCause could use user's avatar as it's icon (and each avatar plugin can override the source of the image).

            Unassigned Unassigned
            gordin Christoph Vogtländer
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: