我试图添加一个新的应用程序在bitrise为我们的HTML为基础的网站。我试着在bitrise上添加一个新的应用程序,但我不知道如何在谷歌存储上将这个新应用程序设置为静态网站。在推送代码到bitbucket仓库时,有没有办法在bitrise上设置一个触发器,将文件和目录上传到google云存储存储桶?谢谢!
发布于 2019-04-03 22:05:52
您应该能够从脚本中执行此操作,例如,使用预先安装在Linux stacks https://cloud.google.com/sdk/gcloud/上的Google Cloud CLI
例如,https://cloud.google.com/storage/docs/uploading-objects包含gsutil的示例。
使用服务帐户进行身份验证:https://cloud.google.com/sdk/gcloud/reference/auth/activate-service-account注意:您可以使用Bitrise通用文件存储来存储服务帐户json密钥文件:https://devcenter.bitrise.io/tutorials/how-to-use-the-generic-file-storage/#uploading-files-to-generic-file-storage-on-bitriseio
基本工作流程如下所示:
JSON SSH Auth和Git Clone步骤,下载code
File Downloader步骤,下载服务帐户文件(上传到通用文件存储:https://devcenter.bitrise.io/tutorials/how-to-use-the-generic-file-storage/#uploading-files-to-generic-file-storage-on-bitriseio中的文件)。或者,如果您想要以加密形式存储它,您可以使用指南( https://devcenter.bitrise.io/tutorials/how-to-use-the-generic-file-storage/#using-the-files-uploaded-to-generic-file-storage-on-bitriseio )Decrypt file步骤,然后使用Script步骤,在该步骤中,您可以激活/验证服务帐户文件( https://cloud.google.com/sdk/gcloud/reference/auth/activate-service-account ),然后以您喜欢的任何方式使用gcloud / gsutil。https://stackoverflow.com/questions/55361354
复制相似问题