从 CircleCI 部署应用程序

Deploy app from CircleCI with

我希望在我们发布新版本后自动部署我的应用程序。我们使用 CircleCI,所以触发这些命令应该没什么大不了的。

cf login -a https://api.lyra-836.appcloud.swisscom.com -u myuser -p seret
cf push myapp

但是我不想将我的个人凭据(Passeport 帐户)公开到我们的 git 存储库中。是否可以为此目的生成 API 密钥?

你是怎么处理的?我可能还需要 ssh 进入实例以在部署后触发一些迁移脚本,同样如此。

CircleCI 文档有一个关于处理秘密的部分:Using CircleCI Environment Variables

Setting environment variables for all commands without adding them to git

Occasionally, you’ll need to add an API key or some other secret as an environment variable. You might not want to add the value to your git history. Instead, you can add environment variables using the Project settings > Environment Variables page of your project.

本文档描述了如何store encrypted stuff within your VCS

If you prefer to keep your sensitive environment variables checked into git, but encrypted, you can follow the process outlined at circleci/encrypted-files.

目前 Swisscoms 应用云不提供技术帐户,但您可以轻松创建一个额外的帐户。然后将其作为开发人员添加到您的 org/space 中,它应该能够满足您的需求。