Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Report build number correctly #1275

Merged
merged 1 commit into from
Nov 3, 2023
Merged

fix: Report build number correctly #1275

merged 1 commit into from
Nov 3, 2023

Conversation

akash1810
Copy link
Member

@akash1810 akash1810 commented Nov 2, 2023

What does this change?

We're currently using the environment variable GITHUB_RUN_NUMBER to determine the build number for build info. GITHUB_RUN_NUMBER is not offset by the number of builds of this project previously performed by TeamCity.

This change creates a new environment variable BUILD_NUMBER which is GITHUB_RUN_NUMBER + the TeamCity offset.

The screenshot below taken from PROD, suggests we're running build 804, when in fact we are running build 3164 (804 + 2360).

image

When deployed to CODE, we get the correct number:

image


Builds on #1229.
Inspired by https://github.com/guardian/flexible-content/pull/4382.

We're currently using the environment variable `GITHUB_RUN_NUMBER` to determine the build number for build info.

`GITHUB_RUN_NUMBER` is not offset by the number of builds of this project previously performed by TeamCity.

This change creates a new environment variable `BUILD_NUMBER` which is `GITHUB_RUN_NUMBER` + the TeamCity offset.
@akash1810 akash1810 marked this pull request as ready for review November 2, 2023 17:31
@akash1810 akash1810 requested review from a team as code owners November 2, 2023 17:31
@akash1810 akash1810 merged commit 7e006c5 into main Nov 3, 2023
1 check passed
@akash1810 akash1810 deleted the aa/build-info branch November 3, 2023 10:03
@akash1810
Copy link
Member Author

This is working as expected on PROD:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants