React-native-code-push: Question: Production deploy requires different js than Staging

Created on 2 Nov 2017  路  2Comments  路  Source: microsoft/react-native-code-push

So we ran into a bit of an issue. Our staging environment has a js config file that is copied during our build process. Same with production. However with codepush, we only get to release one set of code and then promote it. So this assumes that the js in Staging and Production are literally identical. In our case they are not as we reference different endpoints etc...

Is there anyway around this? One way would be if it was possible to deploy directly to production though obviously that's not ideal.

question

Most helpful comment

Thanks @sergey-akhalkov. We actually changed out infrastructure a bit so that the codebase is the same no matter what and it looks at the environment to decide what config to use. This makes everything simpler.

All 2 comments

Hi @stueynet, thanks for reaching us. Promoted release in Production deployment will contain exactly the same code as the release in Staging deployment that has been used for promotion. By security reasons CodePush server does not change any code you pushed.

To test your releases you can use one of the following approaches:

  1. Dynamic Deployment Assignment
  2. Multi-Deployment Testing

Thanks @sergey-akhalkov. We actually changed out infrastructure a bit so that the codebase is the same no matter what and it looks at the environment to decide what config to use. This makes everything simpler.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vira-khdr picture vira-khdr  路  3Comments

osdnk picture osdnk  路  3Comments

djw27 picture djw27  路  3Comments

cgerikj picture cgerikj  路  3Comments

ACCTFORGH picture ACCTFORGH  路  3Comments