Search code examples
jenkinsnumberssequencejenkins-pipeline

Jenkins: How to generate a number sequence for all builds


we are building app for hockeyapp from different branches using the multibranch pipeline. All of the build are being uploaded to HockeyApp using the same app. Since in a multibranch pipeline all jobs have their own build number sequence, we can not use this to generate the app build number.

We do need a sequence that is generated for all jobs on our jenkins counting up.

Any ideas how I can achieve this?


Solution

  • A little late, but just wanted to post how we solved. We simply set up a service endpoint on Jenkins that generates unique number and use that in the job to get a number.