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

Replacing app center #52

Merged
merged 9 commits into from
Feb 21, 2025
Merged

Replacing app center #52

merged 9 commits into from
Feb 21, 2025

Conversation

jgf5013
Copy link
Contributor

@jgf5013 jgf5013 commented Feb 3, 2025

Adds a blog post for how a mobile app dev team can create app builds using GitHub Actions. PR environment is here.

Copy link

github-actions bot commented Feb 3, 2025

PR Preview Action v1.6.0
Preview removed because the pull request was closed.
2025-02-21 14:11 UTC

@jgf5013 jgf5013 marked this pull request as ready for review February 4, 2025 13:11
NODE_OPTIONS=--openssl-legacy-provider changes
Copy link

@jddunbarVDB jddunbarVDB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR title was a bit confusing because I thought Replacing app center would be a PR with functional changes to pipelines or something rather than just a blog update 😅.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you link to the actual ADR rather than just presenting it as an image? There are links and things mentioned in the ADR for example which you might wish to click through to.

@jddunbarVDB
Copy link

Since this is a public blog, are you sure you want to have all these code samples and yaml files etc? Sure, the secrets are obfuscated but still, you are exposing information we don't necessarily want to have publicly visible like the exact versions we use of things etc? Does it add anything for the person reading the blog?

@jgf5013
Copy link
Contributor Author

jgf5013 commented Feb 13, 2025

Since this is a public blog, are you sure you want to have all these code samples and yaml files etc? Sure, the secrets are obfuscated but still, you are exposing information we don't necessarily want to have publicly visible like the exact versions we use of things etc? Does it add anything for the person reading the blog?

Yea I was talking a little bit about a similar topic yesterday with Arnav. I think the specific versions is a good point so I can certainly remove/obfuscate them. In general though I think if you remove too much the content loses it's value. @Jorg88 + @RasimKanca what do you guys think? PR env for the blog is here (note that there's an existing issue in the PR env for blogs where it doesn't show the header image)

@arnavVandebron
Copy link

I think the code samples are fine, especially since Fisher took steps to ensure that the code is as generic as possible without going into too many details of our setup. I think it is quite handy for readers who have the exact same use case we do (the option to publish a white labeled version of the app).

@jddunbarVDB
Copy link

Does anyone actually read our blog? Do we have a number of visitors statistic recorded anywhere?

Comment on lines 10 to 11
## Why?
This seems like a lot of work... Why not go with an off-the-shelf solution from something like Bitrise or Codemagic? Fair question but not the main point of this post. To look into our reasoning check out the [Benefits](#benefits) section!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I would expect "why" to be a question to "Finding a Replacement for App Center". maybe "Why GHA" works better?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, that makes a lot of sense. Updated!

@jgf5013
Copy link
Contributor Author

jgf5013 commented Feb 18, 2025

@arnavVandebron can you leave your thoughts (in a comment is fine) on some of the nuances / troubleshooting you had to do for getting the iOS stuff working? I'd like to publish end of this week if at all possible so sometime this week would be really helpful.

@@ -0,0 +1,648 @@
---
title: Finding a Replacement for App Center
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would argue that this article is specifically about replacing App Center with GitHub Actions and that this should be mentioned in the title.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, good point. Updated ✅

description: App Center is closing up shop on March 31st, 2025 so what's the plan for building mobile apps at Vandebron?
createdAt: 2025-01-25
coverImage: images/replacing-app-center-building-a-phone.jpg
tags: [reactnative, App Aenter, GHA]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo here. Also might be good to add more tags (if they are used) and writing out GitHub Actions for example.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it. Thanks!

Comment on lines +10 to +11
## Why GHA?
This seems like a lot of work... Why not go with an off-the-shelf solution from something like Bitrise or Codemagic? Fair question but not the main point of this post. To look into our reasoning check out the [Benefits](#benefits) section!
Copy link
Contributor

@RasimKanca RasimKanca Feb 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't really understand what purpose this section serves. Perhaps it would be better to end with a section about alternatives. Those other services are also not really that off the shelf.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how else to say it, and I'd like the keep the article more of an implementation guide than anything else. Feel free to suggest some text.


## Some notes before we get started
- We use this workflow to build two apps, one of which can be white-labeled, so we have additional `app` and `white-label-release` inputs which makes things a bit trickier. You might not need that so feel free to trim stuff down and make it your own! But for us, we why we have the `env-variable-prep-android.sh` which normalizes the variable names used for secrets so those secrets and build file names, etc. can be easily used. If you just have a single app you probably don't need this script.
- The code below is only for the build process. Though the ADR considered how this would affect future decisions about artifact upload automation and rolling out releases for internal testing, nothing about that is automated here.
Copy link
Contributor

@RasimKanca RasimKanca Feb 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does everyone know what an ADR is? I am not saying that it needs to be explained in full in this article, but perhaps the meaning of the acronym can be mentioned somewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Thanks!


## Benefits
- It regularly took over 50 minutes for our mobile app to build in App Center. Part of that could have very likely be improved by adjusting App Center configurations & how we store and bundle app assets but after migrating our builds to GitHub Actions our app build times are now down to 22 minutes - More than twice as fast!
- All the rest of the software at Vandebron (backend services in Scala and Python and frontend applications in Typescript + React) is built using GitHub Actions. This move brings mobile apps in line with all other software. This move to GHA for mobile builds has forced several of our mobile devs to get our hands dirty in GHA which is great because we can now play a role in the larger CICD discussions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This move to GHA for mobile builds has forced several of our mobile devs to get our hands dirty in GHA which is great because we can now play a role in the larger CICD discussions.

I understand what you are trying to say, but saying that developers were forced sounds strange to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. And hopefully nobody felt forced 😅. I changed the wording. Thanks!

#### Part 1 - Basic Setup
Add the files below. Nothing in this setup should effect App Center but it is good to check in your changes to a branch and test those against the regular App Center build flow.

<table>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This table requires me to scroll left and right. Is it possible to center it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what you mean... Do you mean you have to use the horizontal scroll to see the full code?
image

I'm not sure there's a good way to avoid that.

If that's not what you mean can you add a screenshot?

- We use this workflow to build two apps, one of which can be white-labeled, so we have additional `app` and `white-label-release` inputs which makes things a bit trickier. You might not need that so feel free to trim stuff down and make it your own! But for us, we why we have the `env-variable-prep-android.sh` which normalizes the variable names used for secrets so those secrets and build file names, etc. can be easily used. If you just have a single app you probably don't need this script.
- The code below is only for the build process. Though the ADR considered how this would affect future decisions about artifact upload automation and rolling out releases for internal testing, nothing about that is automated here.

## Implementation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a lot of code in this article, but not a lot of explanation. Is this intentional? Is the reader supposed to know what all of this code does?

And I also see very little mention of Fastlane, despite it being a requirement for these workflows. I think this article would benefit from a good introduction, describing the setup and afterwards getting into the steps required.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the point is definitely to be more of an "implementation guide" than anything. I see what you mean though - I can add some more explanation. Will post back once that's done.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a bit more information/explanation. If there's anything specific you think should also be added, definitely feel free to add it in comments - I'll add it in as well.

@jgf5013
Copy link
Contributor Author

jgf5013 commented Feb 19, 2025

Does anyone actually read our blog? Do we have a number of visitors statistic recorded anywhere?

We know that some people do because a few interviewees have mentioned it during interview, but that's more than likely just interviewees doing their homework on us before the interview, not organic traffic. I asked Daniela if we have metrics. I checked Google Analytics and didn't see anything, but I'll post back if Daneila knows of something. I think we need to rewrite this little blog app anyway so in the future we can make sure metrics are there.

@jgf5013 jgf5013 merged commit 8ae5efe into master Feb 21, 2025
1 check passed
@jgf5013 jgf5013 deleted the replacing-app-center branch February 21, 2025 14:10
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.

5 participants