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

Distinguish between manually triggered and auto triggered jobs

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I couldn't find a way to distinguish between manually triggered and auto triggered jobs in my pipeline script, using tfs-plugin. What ever i trigger the build mannually or by a code push the result of "currentBuild.getBuildCauses()" : 
      [\{"_class":"hudson.model.Cause$UserIdCause","shortDescription":"Démarré par l'utilisateur Admin Jenkins","userId":"admin","userName":"Admin Jenkins"}]
      I think that the Cause class https://javadoc.jenkins-ci.org/hudson/model/Cause.html should be extended  to keep track of why a given build was started.

        Attachments

          Activity

          Hide
          salmen Salmen Taktak added a comment -

          Any help or feedback please

          Show
          salmen Salmen Taktak added a comment - Any help or feedback please
          Hide
          tgr Tobias Gruetzmacher added a comment -

          Looks like a bug to me in whatever triggers the build, otherwise the build cause should be a different class (for example jenkins.branch.BranchEventCause or hudson.triggers.TimerTrigger$TimerTriggerCause)

          Show
          tgr Tobias Gruetzmacher added a comment - Looks like a bug to me in whatever triggers the build, otherwise the build cause should be a different class (for example jenkins.branch.BranchEventCause or hudson.triggers.TimerTrigger$TimerTriggerCause )

            People

            Assignee:
            jpricketmsft Jason Prickett
            Reporter:
            salmen Salmen Taktak
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: