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

return changeset integer revision id to environment as well as the node

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Our builds require the integer revision id

      {rev} as well as the hash. The following patch created a new environment variable MERCURIAL_REVISIONID and assigns the {rev}

      to it.

        Attachments

          Activity

          Hide
          davidmc24 davidmc24 added a comment -

          Why is the rev required? Since this value is repository-local, the revid is likely to be different between the clone that Jenkins uses and the repository that was specified as the "repository location" in the SCM configuration. Likewise, if your installation has multiple nodes (several slave machines, for example), the revid would likely not be consistent between them.

          Show
          davidmc24 davidmc24 added a comment - Why is the rev required? Since this value is repository-local, the revid is likely to be different between the clone that Jenkins uses and the repository that was specified as the "repository location" in the SCM configuration. Likewise, if your installation has multiple nodes (several slave machines, for example), the revid would likely not be consistent between them.
          Hide
          trbaker Trevor Baker added a comment -

          Since no one ever commits to the jenkins machines the nodes cloning will have the same integer ids as the canonical repo everyone pushes to. We use the revid in addition to the hash as the buildnumber in the binary/manifest, etc.

          Show
          trbaker Trevor Baker added a comment - Since no one ever commits to the jenkins machines the nodes cloning will have the same integer ids as the canonical repo everyone pushes to. We use the revid in addition to the hash as the buildnumber in the binary/manifest, etc.
          Hide
          jglick Jesse Glick added a comment -

          https://github.com/jenkinsci/mercurial-plugin/pull/23 has a better patch, will use that.

          Show
          jglick Jesse Glick added a comment - https://github.com/jenkinsci/mercurial-plugin/pull/23 has a better patch, will use that.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/hudson/plugins/mercurial/HgExe.java
          src/main/java/hudson/plugins/mercurial/MercurialSCM.java
          src/main/java/hudson/plugins/mercurial/MercurialTagAction.java
          src/main/resources/hudson/plugins/mercurial/MercurialTagAction/index.jelly
          http://jenkins-ci.org/commit/mercurial-plugin/243a424ca3aa792cd6f4b71c59c24b684cd464e4
          Log:
          Merge pull request #23 from geofflane/master

          [FIXED JENKINS-11549] Add MERCURIAL_CHANGESET_NUMBER to exported environment variables

          Compare: https://github.com/jenkinsci/mercurial-plugin/compare/6c5a04e...243a424

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/plugins/mercurial/HgExe.java src/main/java/hudson/plugins/mercurial/MercurialSCM.java src/main/java/hudson/plugins/mercurial/MercurialTagAction.java src/main/resources/hudson/plugins/mercurial/MercurialTagAction/index.jelly http://jenkins-ci.org/commit/mercurial-plugin/243a424ca3aa792cd6f4b71c59c24b684cd464e4 Log: Merge pull request #23 from geofflane/master [FIXED JENKINS-11549] Add MERCURIAL_CHANGESET_NUMBER to exported environment variables Compare: https://github.com/jenkinsci/mercurial-plugin/compare/6c5a04e...243a424

            People

            • Assignee:
              kohsuke Kohsuke Kawaguchi
              Reporter:
              trbaker Trevor Baker
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: