docker - 使用旧的codeship/google-cloud-deployment图像卡住了codeship

标签 docker continuous-integration continuous-deployment codeship

我一直在更新使用Codeship Pro构建和部署的项目之一。我们使用codeship/google-cloud-deployment docker镜像来部署Google云功能。我需要仅在gcloud sdk的最新版本中可用的功能,但是编码通常使用sdk的旧版本,并且似乎在获取图像的缓存版本时卡住了。

codeship-services.yml

googlecloudproductiondeployment:
  image: codeship/google-cloud-deployment
  encrypted_env_file: deploy/deploy-production.env.encrypted
  cached: false
  volumes:
    - ./:/deploy

codeship-steps.yml
- name: Deploy CF to prod
  tag: ^deploy-production$
  service: googlecloudproductiondeployment
  command: /deploy/deploy/google-deploy-cf.sh

部署/google-deploy-cf.sh

#!/bin/bash

set -e

PROJECT=my-project
FUNCTION_NAME=my-function
SOURCE_REPO=my-repo

# Authenticate on google SDK
codeship_google authenticate

# Re-deploy the CF
gcloud version
gcloud beta functions deploy $FUNCTION_NAME --region europe-west1 --runtime nodejs8 --env-vars-file /deploy/deploy/cf-env.production.yaml --trigger-http --source https://source.developers.google.com/projects/my-project/repos/${PROJECT}/fixed-aliases/${CI_BRANCH} --memory 128MB --entry-point run --timeout 540s

在代码中观察到的输出:
googlecloudproductiondeployment build/pull started
googlecloudproductiondeployment build/pull finished successfully
googlecloudproductiondeployment Activated service account credentials for: [***@***.iam.gserviceaccount.com]
googlecloudproductiondeployment Google Cloud SDK 204.0.0
googlecloudproductiondeployment alpha 2017.09.15
googlecloudproductiondeployment beta 2017.09.15
googlecloudproductiondeployment bq 2.0.34
googlecloudproductiondeployment core 2018.06.04
googlecloudproductiondeployment gsutil 4.31
googlecloudproductiondeployment kubectl 
googlecloudproductiondeployment deployng
googlecloudproductiondeployment ERROR: (gcloud.beta.functions.deploy) unrecognized arguments: 2018-10-08 07:42:29 googlecloudproductiondeployment  --runtime (did you mean '--timeout'?)
googlecloudproductiondeployment  nodejs8
googlecloudproductiondeployment  --env-vars-file
googlecloudproductiondeployment  /deploy/deploy/cf-env.production.yaml

预期产量:

我希望看到Google Cloud SDK 218.0.0,它是codeship's google-cloud-deployment github repo的最后一次提交中提到的版本。

尝试的步骤:
  • :latest添加到codeship-services.yml中的图像。
  • 在codeship的项目页面上单击Reset Cache
  • 即使重置了缓存,我也始终在代码船上的Image exists, using cached image服务的日志中看到googlecloudproductiondeployment
  • 在本地使用jet时,我可以通过在jet步骤之前运行docker rmi codeship/google-cloud-deployment来使代码制作者拉动最新版本。但是,我无法控制代码船上的Docker缓存。

  • 似乎使用旧版本的codeship/google-cloud-deployment图像卡住了代码芯片。在docker hub上,此图像除了latest之外没有其他标签,所以我不知道如何强制代码船获得特定版本。请帮忙!

    最佳答案

    抱歉造成麻烦。

    我们已经进行了工作,并确保codeship/google-cloud-deployment的版本保持最新。

    通常,我们会在两到三周的时间内跟踪最新的Google Cloud SDK。但这将与最新版本保持更接近的均等。我们现在也可以根据需要加快Google Cloud SDK的更新。

    如果您重置项目缓存并重新开始构建,则您将注意到(截至撰写本文时)Google Cloud SDK现在已设置为219.0.1图像的codeship/google-cloud-deployment版本。

    关于docker - 使用旧的codeship/google-cloud-deployment图像卡住了codeship,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52699106/

    相关文章:

    docker - 如何在 Gitlab-CI Runner 上下文中连接到 Apache?

    python - 将消息从容器发布到在容器外部运行的kafka

    git - Jenkins 使用 Publish over SSH 插件传输 0 个文件

    linux - Docker 容器无法运行

    .net - 如何提高团队建设性能?

    git - 使用SaltStack,如何与外部构建工具通信

    java - 使用 Docker 云进行 Spring Boot 自动化构建

    chef-infra - 使用 Chef 持续部署和编排

    scala - 在 docker compose 文件中将环境设置为列表

    docker - 无法访问我在 Linux docker 中托管的 ASP.Net Core 网站