Details
-
New Feature
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Duplicate
-
See attached System Information pdf file.
Description
Currently I am using the incremented build number provided by Jenkins for the release version of our iOS and Android app. Product/dev drive the release numbers. Once the feature branch is merged into master, a build is automatically kicked off and if the release number is incremented, I want to reset the build number back to 1. For example if 5.0.1 (5) is the current market release and dev merges a feature branch into master with a greater release number, like 5.0.2, I want to reset the build number back to 1 so that the app version is now 5.0.2 (1). My Jenkins is on a Linux server that uses a Mac OS X agent for building our iOS app. How do I reset the build number back to 1 after the build has automatically kicked off, checked out the source code, and checked to see if the build should be reset?
Attachments
Issue Links
- blocks
-
JENKINS-33046 Next Build Number plugin doesn't work for Workflow or Multi-branch Workflow jobs
-
- Reopened
-
derrikammons I think there is a key phrase in your reply which highlights the challenge
That is more logic than the Jenkins build number is designed to support. The Jenkins build number is an increasing counter of builds that were launched.
I think you want a release version number with more intelligence than the simple counter that is the Jenkins build number.
There are probably ways to map the simple counter into a release version number, but I think it will be a continual struggle mapping the simple counter to your release version number semantics. I think that the intelligence of the release number will be easier for you to manage elsewhere, rather than trying to derive that intelligence from a simple counter.