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

Provide a way to reset build number to 1 within Jenkinsfile for a Multibranch Pipeline


      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?

            Unassigned Unassigned
            derrikammons Derrik Ammons
            0 Vote for this issue
            3 Start watching this issue