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?

          [JENKINS-44757] Provide a way to reset build number to 1 within Jenkinsfile for a Multibranch Pipeline

          Derrik Ammons created issue -
          Derrik Ammons made changes -
          Component/s New: next-build-number-plugin [ 15651 ]
          Derrik Ammons made changes -
          Labels Original: BuildNumber New: core plugin
          Derrik Ammons made changes -
          Link New: This issue blocks JENKINS-33046 [ JENKINS-33046 ]
          Derrik Ammons made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

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

              Created:
              Updated:
              Resolved: