ENV VAR BITRISE_BUILD_NUMBER return 1

Bitrise Build Issue Report template

Description of the issue

Hello,
I’m trying using the bitrise build number env var for setting my version code for my android app, I don’t know why but the value of BITRISE_BUILD_NUMBER is 1 and should be another number (1994 in my case) I try several way to display it (fastlane, gradle and bash script).

Example :
echo $BITRISE_BUILD_NUMBER

isPr: True
I try locally by defining it it works perfectly (export BITRISE_BUILD_NUMBER=2000) but on bitrise.io it doesn’t.

Environment:

If on Bitrise.io: which stack? If not on Bitrise.io: on what operating system? (Plus any other information you can share)
I’m using the linux stack

Not really a step but an environnement variable

E.g.: Git Clone v3.6.0

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : NO
  • Does the issue happen sporadically, or every time? : every time
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? :
    I don’t know

Local reproduction

Can it be reproduced on your own Mac/PC by following our local debug guide? Please follow at least the first section (“Testing with a full clean git clone”) to make sure to test the state of the code what bitrise.io will get when it does a git clone in the clean environment! If possible please note which sections you tried.
Locally defining the env var it works

Local reproduction: Linux / Android (docker based) stack builds

Can it be reproduced by running the build locally, after doing a new git clone of the repository into the /tmp directory and running the build from there with the Bitrise CLI ( https://www.bitrise.io/cli )? If no, can it be reproduced with Docker (using the same docker images / environment we use on bitrise.io)? Related guide: http://devcenter.bitrise.io/docker/run-your-build-locally-in-docker/ .

Build log

Please copy paste the build’s bitrise.io URL here (or if the issue happens somewhere else then the full logs), or if you can’t share the url / log here then send the url or full log through a private channel (e.g. email - https://www.bitrise.io/contact ), with a link to the related Discuss issue.
Log from command which print all env vars (using gradle)

[08:11:21]: ▸ > Task :app:printEnv

[08:11:21]: ▸ PATH=/usr/local/lib/ruby/gems/2.7.0/bin:/root/.bitrise/tools:/bitrise/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/opt/android-sdk-linux/platform-tools:/opt/android-sdk-linux/cmdline-tools/tools/bin:/opt/gradle/gradle-6.3/bin/:/opt/android-ndk

[08:11:21]: ▸ GIT_CLONE_COMMIT_COMMITER_EMAIL=mbertin@[REDACTED].tv

[08:11:21]: ▸ GRADLEW_PATH=./gradlew

[08:11:21]: ▸ PR=true

[08:11:21]: ▸ BUNDLER_ORIG_RUBYLIB=BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL

[08:11:21]: ▸ BITRISEIO_STACK_ID=linux-docker-android

[08:11:21]: ▸ GIT_CLONE_COMMIT_COUNT=15900

[08:11:21]: ▸ ADDON_VDTESTING_API_URL=[REDACTED]

[08:11:21]: ▸ SLACK_WEBHOOK_URL=[REDACTED]

[08:11:21]: ▸ BUNDLE_BIN_PATH=/usr/local/lib/ruby/gems/2.7.0/gems/bundler-1.17.2/exe/bundle

[08:11:21]: ▸ ANDROID_HOME=/opt/android-sdk-linux

[08:11:21]: ▸ BITRISEIO_GIT_REPOSITORY_OWNER=MolotovTv

[08:11:21]: ▸ BUNDLER_ORIG_MANPATH=BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL

[08:11:21]: ▸ TOOL_VER_DOCKER_COMPOSE=1.21.2

[08:11:21]: ▸ BITRISE_DEFAULT_CERTIFICATE_URL=[REDACTED]

[08:11:21]: ▸ ANDROID_DEV_FIREBASE_TOKEN=[REDACTED]

[08:11:21]: ▸ LD_LIBRARY_PATH=/opt/android-sdk-linux/emulator/lib64:/opt/android-sdk-linux/emulator/lib64/qt/lib

[08:11:21]: ▸ ADDON_VDTESTING_API_TOKEN=[REDACTED]

[08:11:21]: ▸ ANDROID_NDK_VERSION=r21d

[08:11:21]: ▸ BITRISEIO_GIT_REPOSITORY_SLUG=android-cocktail

[08:11:21]: ▸ BITRISEIO_ANDROID_KEYSTORE_ALIAS=[REDACTED]alpha

[08:11:21]: ▸ BITRISE_PREP_DIR=/bitrise/prep

[08:11:21]: ▸ BITRISE_CACHE_API_URL=[REDACTED]

[08:11:21]: ▸ BUNDLER_ORIG_RB_USER_INSTALL=BUNDLER_ENVIRONMENT_PRESERVER_INTENTIONALLY_NIL

[08:11:21]: ▸ PWD=/bitrise/src

[08:11:21]: ▸ GCLOUD_SDK_CONFIG=/usr/lib/google-cloud-sdk/lib/googlecloudsdk/core/config.json

[08:11:21]: ▸ BITRISE_GIT_MESSAGE=[WIP][COR-198] Improve CI

[08:11:21]: ▸ ## Description

[08:11:21]: ▸ { Insert here the description }

[08:11:21]: ▸ JIRA : { Link to JIRA, or delete this line if no ticket is associated }

[08:11:21]: ▸ ## Type of change

[08:11:21]: ▸ { Please delete options that are not relevant. }

[08:11:21]: ▸ - [ ] Bug fix (non-breaking change which fixes an issue)

[08:11:21]: ▸ - [ ] New feature (non-breaking change which adds functionality)

[08:11:21]: ▸ - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

[08:11:21]: ▸ - [ ] This change requires a documentation update

[08:11:21]: ▸ ## Screenshot

[08:11:21]: ▸ { Delete Screenshot section if empty }

[08:11:21]: ▸ | Before | After |

[08:11:21]: ▸ | ------------- | ------------- |

[08:11:21]: ▸ |||

[08:11:21]: ▸ ## Checklist:

[08:11:21]: ▸ - [ ] I updated the release_notes.txt file

[08:11:21]: ▸ - [ ] My code follows the style guidelines of this project

[08:11:21]: ▸ - [ ] I have performed a self-review of my own code

[08:11:21]: ▸ - [ ] My changes generate no new warnings

[08:11:21]: ▸ BITRISE_TEST_RESULT_DIR=/tmp/test_results551301803/test_result880151645

[08:11:21]: ▸ LANGUAGE=en_US.UTF-8

[08:11:21]: ▸ BITRISE_DEFAULT_CERTIFICATE_PASSPHRASE=[REDACTED]

[08:11:21]: ▸ BITRISE_BUILD_NUMBER=1

[08:11:21]: ▸ GRADLE_VERSION=6.3

[08:11:21]: ▸ GIT_CLONE_COMMIT_AUTHOR_EMAIL=mbertin@[REDACTED].tv

[08:11:21]: ▸ BITRISE_BUILD_TRIGGER_TIMESTAMP=1600675566

There BITRISE_BUILD_NUMBER is equals to 1

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.