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

Provide environment variable for the last changeset that contributed to a projects build

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • p4-plugin
    • None

      Currently P4_CHANGELIST gives the last sync changeset id for a depot. On depots which containing a single project this will match the last changeset for that project, but when a depot hosts multiple projects the last sync'd changeset can be greater than the last changeset that affected an individual project.

      I've tested a quick patch that creates an environment variable P4_LAST_CHANGELIST with the last changeset id related to the current project, which is available here;

      https://github.com/namtabmai/perforce-plugin/commit/765dff821abf46a5eace30c28b2a991f294e38fe

      I'm not overly happy with that env name but it at least seems to work as expected on the builds I've tested it on.

          [JENKINS-15515] Provide environment variable for the last changeset that contributed to a projects build

          _ created issue -
          Ben Golding made changes -
          Link New: This issue is related to JENKINS-15653 [ JENKINS-15653 ]
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 146271 ] New: JNJira + In-Review [ 191856 ]
          Jenkins IRC Bot made changes -
          Component/s New: p4-plugin [ 19224 ]
          Component/s Original: perforce-plugin [ 15506 ]

            Unassigned Unassigned
            namtabmai _
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: