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

Set BUILD_USER to "SCMTrigger" if a build is run because of a source code change

    Details

    • Similar Issues:

      Description

      If a build is run because of a change in the source code (SCMTrigger) all variables are empty.

      We have a deployment pipeline that builds a war file and deploys it on to a development environment.
      In order to know who is responsible for the current status on this development environment we want to write the username into a file that is contained in the war file.
      This works when the build is run manually but not if it is run from the SCMTrigger.

        Attachments

          Activity

          Hide
          clifford_jenkins Clifford Sanders added a comment -
          Show
          clifford_jenkins Clifford Sanders added a comment - I have forked the code: https://github.com/clifford-github/build-user-vars-plugin
          Hide
          clifford_jenkins Clifford Sanders added a comment -
          Show
          clifford_jenkins Clifford Sanders added a comment - I have create a pull request: https://github.com/jenkinsci/build-user-vars-plugin/pull/2
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Clifford Sanders
          Path:
          src/main/java/org/jenkinsci/plugins/builduser/BuildUser.java
          src/main/java/org/jenkinsci/plugins/builduser/varsetter/impl/SCMTriggerCauseDeterminant.java
          http://jenkins-ci.org/commit/build-user-vars-plugin/e2e328e8bc71412d24b8ec366fbba4d6d3fa52e1
          Log:
          Set BUILD_USER to "SCMTrigger" if a build is run because of a source code change - fixes JENKINS-21955

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Clifford Sanders Path: src/main/java/org/jenkinsci/plugins/builduser/BuildUser.java src/main/java/org/jenkinsci/plugins/builduser/varsetter/impl/SCMTriggerCauseDeterminant.java http://jenkins-ci.org/commit/build-user-vars-plugin/e2e328e8bc71412d24b8ec366fbba4d6d3fa52e1 Log: Set BUILD_USER to "SCMTrigger" if a build is run because of a source code change - fixes JENKINS-21955
          Hide
          clifford_jenkins Clifford Sanders added a comment -

          fixed in release 1.2

          Show
          clifford_jenkins Clifford Sanders added a comment - fixed in release 1.2

            People

            • Assignee:
              clifford_jenkins Clifford Sanders
              Reporter:
              clifford_jenkins Clifford Sanders
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: