设置Firebase托管的自定义域名,使用Firebase CLI在CloudBuild上。

huangapple go评论62阅读模式
英文:

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:

huangapple
  • 本文由 发表于 2023年5月22日 02:15:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/76301297.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定