microsoft / code-push

A cloud service that enables Cordova and React Native developers to deploy mobile app updates directly to their users’ devices.
https://microsoft.github.io/code-push/
Other
4.37k stars 501 forks source link

How are you supposed to configure "Staging builds" and "Production Builds" #788

Closed mattwoberts closed 2 years ago

mattwoberts commented 2 years ago

Hi there.

I'm currently trying to work out how to structure our app so that:

  1. We have a "staging build" and "production build", each with it's own deployment key configured as per the docs
  2. We want to deploy code push updates to the staging build, and promote to production.

However, when you add a build, you are forced to choose staging or production at this point. We want BOTH - in that we want a staging build on our phones, and a production build also. Surely this is key to testing the code push deployment in the staging build app before you promote it.

You could create 2 different apps, one for staging and one for production, but this gives you 2 different "app secrets" so you would need to ensure that your app was able to switch between the 2 depending on the build configuration.

Is that the idea - I can't see anything in the docs that describes how you would go about having a staging and production build....

mattwoberts commented 2 years ago

Just to add more confusion to this...

If you DO go ahead and create 2 apps - one that does staging builds and one that does production builds, then this wouldn't work, because each app has it's own set of deployment keys, so you couldn't promote from one app to production in another.

The only way I can see this working is if you manually fire off a staging build from an app, or if you have multiple branches set up, and one is used to trigger staging builds, and you do it that way.

Some clarity / confirmation here would be great :)

amanolar commented 2 years ago

Hello @mattwoberts I don't know if you are still having this issue but we are working on it at the moment as well and we have the same scenario. In the build we use the codepush keys which we get from env and we set them up in App Center when building. And then we use one script for building the staging app and one for production.

ghost commented 2 years ago

This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.

ghost commented 2 years ago

This issue will now be closed because it hasn't had any activity for 15 days after stale. Please feel free to open a new issue if you still have a question/issue or suggestion.