【问题标题】:How to use BitBucket Pipelines to update Google Cloud Compute Engine instance after a push?推送后如何使用 BitBucket Pipelines 更新 Google Cloud Compute Engine 实例?
【发布时间】:2018-02-04 07:07:31
【问题描述】:

我看过有关如何使用 App Engine 完成此任务的文档,但在 Compute Engine 上没有。谢谢!

【问题讨论】:

  • 你完成这项任务了吗?
  • 我最终切换到另一个解决方案,祝你好运!

标签: docker google-cloud-platform bitbucket google-compute-engine bitbucket-pipelines


【解决方案1】:

您可以使用 Cloud Deployment Manager API 编写 Compute Engine 应用程序。 https://cloud.google.com/deployment-manager

此 Atlassian 博客文章中“bitbucket-pipelines.yml”文件的最后一行是“gcloud app deploy”,用于更新 App Engine 应用程序。 https://confluence.atlassian.com/bitbucket/deploy-to-google-cloud-900820342.html

# Deploying the application
- gcloud -q app deploy app.yaml

对于 Deployment Manager API,使用“gcloud deployment-manager deployments update”。 https://cloud.google.com/sdk/gcloud/reference/deployment-manager/deployments/update

例如:

# Deploying the application
- gcloud -q deployment-manager deployments update my-deployment --config config.yaml

我建议您查看将 Deployment Manager API 与 CI/CD 管道结合使用的最佳实践。 https://cloud.google.com/deployment-manager/docs/best-practices/#continuous_integration_ci_continuous_deployment_cd

【讨论】:

    猜你喜欢
    • 2020-04-30
    • 2021-05-15
    • 1970-01-01
    • 2021-11-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-15
    • 2018-07-31
    • 2014-11-22
    相关资源
    最近更新 更多