英文:
How to setup custom domain for firebase hosting using firebase cli on CloudBuild
问题
I currently have a running CloudBuild
pipeline where I deploy an app to Firebase Hosting.
cloudbuild.yaml:
// 省略部分文本
- name: gcr.io/$PROJECT_ID/firebase
args: ['deploy', '--project=$PROJECT_ID', '--only=hosting', '-m', 'Pipeline $BUILD_ID, committed by $_COMMIT_USER - $SHORT_SHA']
// 省略部分文本
But I am unable to find out how to configure a custom domain for the deployed app within the same cloudbuild.yaml or any other command-line way. on google docs, there is only a way to set up from Firebase Console.
any idea?
英文:
I currently have a running CloudBuild
pipeline where I deploy an app to firebase hosting.
cloudbuild.yaml:
// omitted text
- name: gcr.io/$PROJECT_ID/firebase
args: ['deploy', '--project=$PROJECT_ID', '--only=hosting', '-m', 'Pipeline $BUILD_ID, committed by $_COMMIT_USER - $SHORT_SHA']
// omitted text
But I am unable to find out how to configure custom domain for the deployed app within the same cloudbuild.yaml or any other command-line way. on google docs, there is only a way to setup from firebase console.
any idea?
答案1
得分: 1
根据我所了解,目前没有公共API或CLI命令来通过Firebase Hosting配置自定义域名。唯一的方法是确实您所找到的方式,通过控制台添加自定义域名。
这是一个有效的功能请求,所以我建议您在支持团队的 功能请求 页面上提交,并可能还在 firebase.uservoice.com 上提交。
英文:
As far as I know there is currently no public API, nor a CLI command, to configure a custom domain name through Firebase Hosting. The only way to add a custom domain is indeed what you found, through the console.
It's a valid feature request though, so I'd recommend filing a feature request with the support team and possibly also on firebase.uservoice.com.
Also see:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论