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

CI/CD - Use build number provided by CI/CD services #316

Open
phongvhd93 opened this issue Aug 9, 2022 · 3 comments
Open

CI/CD - Use build number provided by CI/CD services #316

phongvhd93 opened this issue Aug 9, 2022 · 3 comments
Assignees

Comments

@phongvhd93
Copy link
Contributor

Why

CI/CD tools like Bitrise, GitHubAction, and Codemagic provide the build number so we can use that for the build number of the application. We will update our templates for Bitrise and GitHubAction to get the following benefit:

  • It is easier to track the commit of a version.
  • Make the build number more predictable.
  • Avoid duplicate build numbers when rebuilding the same commit (after registering a new device, we must re-deploy the app).
  • CI machines don't have to clone the whole project history to get the correct number of commits, reducing the overall build time and the cost of running CI/CD.

Who Benefits?

@nimblehq/ios-chapter

@markgravity markgravity modified the milestones: 3.9.0, 3.10.0 Aug 30, 2022
@edgarss edgarss self-assigned this Sep 13, 2022
@markgravity markgravity modified the milestones: 3.10.0, 3.11.0 Sep 28, 2022
@vnntsu vnntsu modified the milestones: 3.11.0, 3.12.0 Nov 7, 2022
@vnntsu vnntsu modified the milestones: 3.12.0, 3.13.0 Nov 30, 2022
@vnntsu vnntsu modified the milestones: 4.0.0, 4.1.0 Jan 3, 2023
@vnntsu vnntsu modified the milestones: 4.1.0, 4.2.0 Jan 31, 2023
@vnntsu vnntsu modified the milestones: 4.2.0, 4.3.0 Feb 28, 2023
@ducbm051291 ducbm051291 assigned ducbm051291 and unassigned edgarss Mar 7, 2023
@olivierobert olivierobert assigned edgarss and unassigned ducbm051291 Mar 8, 2023
@olivierobert
Copy link
Contributor

@ducbm051291 This was assigned to @edgarss so for now it is still need to be assigned to him. It is part of his personal tasks to complete 🙏

@blyscuit
Copy link
Collaborator

blyscuit commented Mar 8, 2023

To improve on @phongvhd93 AC. I think this is referring to https://devcenter.bitrise.io/en/builds/build-numbering-and-app-versioning.html and GITHUB_RUN_NUMBER from https://docs.github.com/en/actions/learn-github-actions/variables. Not sure about other CI providers. Just so that we are aligned 🙇 .

@Thieurom
Copy link

Thieurom commented Apr 7, 2023

This is great and very convenient 🙏

However, we should be careful in case the project switches to another CI service in the middle of development.

Let's say that project has been using GitHub Action to deploy builds to TestFlight up to 1.2.0(250) using GITHUB_RUN_NUMBER. Now they have switched to Bitrise, and the very first build on Bitrise that uses BITRISE_BUILD_NUMBER would be 1.2.0(1). This is not what we expected. Furthermore, Apple might reject the build or silently increment the build, which is out of our control and confuse us.

As I see, Bitrise allows us to offset the build number. GitHub Action is not specifically for iOS, so we have to do that manually. And it seems more complicated than it should be (https://github.com/orgs/community/discussions/25386).

In either case, we should bear this in mind. We might note this on the Infrastructure of the Wiki 🙏

@ducbm051291 ducbm051291 linked a pull request Apr 19, 2023 that will close this issue
@ducbm051291 ducbm051291 self-assigned this Apr 19, 2023
@vnntsu vnntsu removed this from the 4.4.0 milestone May 8, 2023
@vnntsu vnntsu added this to the 4.5.0 milestone May 8, 2023
@vnntsu vnntsu modified the milestones: 4.5.0, 4.6.0 Jun 5, 2023
@blyscuit blyscuit modified the milestones: 4.6.0, 4.8.0 Aug 9, 2023
@blyscuit blyscuit removed this from the 4.8.0 milestone Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants