• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      in my case, it would be interesting to have a build number not incremental.
      for example, it could be set to the repository revision number, or a number
      computed based on the date.

          [JENKINS-53] programmatically set build number

          We used to have this feature back then. I removed it when I started relying on
          the uniqueness of the build number more (such as use of build numbers in URL.)

          So I'm bit skeptical for doing this. But if you do this, we just need to be
          careful that we only allow build numbers to be increased.

          Kohsuke Kawaguchi added a comment - We used to have this feature back then. I removed it when I started relying on the uniqueness of the build number more (such as use of build numbers in URL.) So I'm bit skeptical for doing this. But if you do this, we just need to be careful that we only allow build numbers to be increased.

          al_xipe added a comment -

          I understand your point.
          That makes sense, maybe I should around that as it is a volunteer limitation to
          prevent potential problems.
          At least I'll put more thinking into this.

          One use case I was thinking about that for:
          I need to have the same build number accross a many projects.
          Actually, each project is the same code built and tested on different platforms.
          The ability to garantee a common build number for all the platforms is crucial
          for the guys in the field, sustaining or debugging purposes.

          Maybe I can think of another way to do this

          al_xipe added a comment - I understand your point. That makes sense, maybe I should around that as it is a volunteer limitation to prevent potential problems. At least I'll put more thinking into this. One use case I was thinking about that for: I need to have the same build number accross a many projects. Actually, each project is the same code built and tested on different platforms. The ability to garantee a common build number for all the platforms is crucial for the guys in the field, sustaining or debugging purposes. Maybe I can think of another way to do this

              • Issue 507 has been marked as a duplicate of this issue. ***

          Kohsuke Kawaguchi added a comment - Issue 507 has been marked as a duplicate of this issue. ***

          dgreen added a comment -

          I'm interested in this feature. In our case, the SVN revision number is our build number. With other CI
          servers the algorithm to create a new build number would be as follows:

          String buildNumber = getSvnRevision()
          if (inUse(buildNumber)) {
          buildNumber = buildNumber+uniqueBuildNumberSequence().nextVal()
          }

          This would guarantee a unique build number for every build, but if possible the build number is based
          on the SVN revision.

          The main priority for us is that the build artifacts be accessible via an URL that is SVN-revision based.
          If it's not possible to have a build number be the SVN revision, then perhaps some kind of build alias
          would be sufficient.

          dgreen added a comment - I'm interested in this feature. In our case, the SVN revision number is our build number. With other CI servers the algorithm to create a new build number would be as follows: String buildNumber = getSvnRevision() if (inUse(buildNumber)) { buildNumber = buildNumber+uniqueBuildNumberSequence().nextVal() } This would guarantee a unique build number for every build, but if possible the build number is based on the SVN revision. The main priority for us is that the build artifacts be accessible via an URL that is SVN-revision based. If it's not possible to have a build number be the SVN revision, then perhaps some kind of build alias would be sufficient.

          dgreen added a comment -

          watch this issue

          dgreen added a comment - watch this issue

          huybrechts added a comment -

          I've just committed some functionality to the description-setter plugin that may
          help. You can use the description-setter to set the description of a build.
          Later you can retrieve a build by using this url:
          /job/<jobName>/by-description/<description>. In your case the description would
          be the SVN revision.

          huybrechts added a comment - I've just committed some functionality to the description-setter plugin that may help. You can use the description-setter to set the description of a build. Later you can retrieve a build by using this url: /job/<jobName>/by-description/<description>. In your case the description would be the SVN revision.

          dgreen added a comment -

          great! I can't wait to try it out.

          dgreen added a comment - great! I can't wait to try it out.

          jlongman added a comment -

          I'd like to be able to share the build number between jobs.

          With a universal increasing build number we can stop including internal build
          details to customers and make it simple, but still track whether something comes
          from an developer, an incremental, a nightly, or an official.

          This still maintains the properties that koshuke used to justify removing the
          programmatic settings.

          jlongman added a comment - I'd like to be able to share the build number between jobs. With a universal increasing build number we can stop including internal build details to customers and make it simple, but still track whether something comes from an developer, an incremental, a nightly, or an official. This still maintains the properties that koshuke used to justify removing the programmatic settings.

          In 1.390, the display name of a build is modifiable.
          Committed in ad27bab4e74178aa86a973acb20d6c0747aad894

          Kohsuke Kawaguchi added a comment - In 1.390, the display name of a build is modifiable. Committed in ad27bab4e74178aa86a973acb20d6c0747aad894

            al_xipe al_xipe
            al_xipe al_xipe
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: