Next Pipeline Number

Workflows currently allow us to set build numbers via App Settings > Build > Next Build Number. A common scenario to use the build number is as the versionCode for an Android APK. When migrating from one CI system to Bitrise, we set this value to start from the last build number on the old CI system, as versionCode must increment higher.

Pipelines does not have this feature for BITRISEIO_PIPELINE_ID. Thus when migrating from Workflows to Pipelines, the first versionCode would be 1.

Why don’t we want to use BITRISE_BUILD_NUMBER ? If we have parallelised building debug and release APKs, they ideally should have the same versionCode. BITRISE_BUILD_NUMBER is unique per workflow so we wouldn’t achieve that. The more parallelisation, the more BITRISE_BUILD_NUMBER increases quicker than BITRISEIO_PIPELINE_ID. We don’t want the versionCode to increase dramatically because there’s a finite range for versionCodes.

Pipelines should have the same option as workflows currently do, so we can go to App Settings.> Build and configure e.g. Next Pipeline Number.

We are planning to put standalone builds and pipeline builds on the same numbering sequence. Workflows running from pipelines will all have the same BITRISE_BUILD_NUMBER. When this is released, you will be able to use the current “Next Build Number” to affect your pipeline builds as well.

Hey @joshuaongps , this has been released some time ago, apologies for the late notice.

1 Like