Firebase Functions版本的“部署到多个环境" [英] Firebase Functions version of "Deploy to multiple environments"

本文介绍了Firebase Functions版本的“部署到多个环境"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如此处建议:" https://firebase.googleblog.com/2016/07/deploy-to-multiple-environments-with.html ",则应使用多个 projects (最好将名称区分为dev,staging和production等),以拥有类似于Firebase Hosting的测试环境.

As suggested here: "https://firebase.googleblog.com/2016/07/deploy-to-multiple-environments-with.html", one should use multiple projects (preferably name-differentiated into dev, staging, production, etc) to be able to have a test environment like that on Firebase Hosting.

但是,本文再次在Firebase托管环境中讨论了这种方法.如果我不想在测试开发"版本之前更新我已经上线的生产"功能,那么对Firebase Cloud Functions遵循的方法是否相同,还是可以遵循另一种方法?

But again, this document speaks about this approach in the context of Firebase Hosting. Is the same to be followed for Firebase Cloud Functions, if I do not want to update my already live, "production" function before testing the "development" version, or is there an alternate approach which can be followed?

我认为我不能简单地添加另一个Firebase函数,因为代码仍将在生产"版本和开发"版本之间保持共享,这可能会在生产"版本中引起问题. /em>

I don't think I can simply add another Firebase Function, as code would still remain shared between the "production" version and the "development" version, which can cause problems in the "production" version.

推荐答案

对每个环境使用专用项目与所有Firebase产品的推荐做法相同.

The use of dedicated projects for each enviornment is the same recommended practice for all Firebase products.

这篇关于Firebase Functions版本的“部署到多个环境"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆