1

I've been updating one of our projects that is built and deployed using codeship pro. We use codeship/google-cloud-deployment docker image to deploy google cloud functions. I need features that are only available in a recent version of the gcloud sdk, but codeship always uses an old version the sdk and seems stuck fetching a cached version of the image.

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

deploy/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

Output observed in codeship:

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

Expected output:

I expect to see Google Cloud SDK 218.0.0, the version noted in the last commit in codeship's google-cloud-deployment github repo.

Steps tried:

  1. Adding :latest to the image in codeship-services.yml.
  2. Clicking on Reset Cache on the project page on codeship.
    • Even after reseting the cache, I always see Image exists, using cached image in the logs for my googlecloudproductiondeployment service on codeship.
  3. Using jet locally, I can fore codeship to pull the latest version by running docker rmi codeship/google-cloud-deployment before jet steps. However, I do not have control over the docker cache on codeship.

It seems codehip is stuck using an old version of the codeship/google-cloud-deployment image. On docker hub this image has no tags other than latest, so I don't know how to force codeship to get a specific version. Please help!

codyzu
  • 541
  • 3
  • 18

1 Answers1

1

Apologies for the trouble.

We've gone ahead and ensured that versions of codeship/google-cloud-deployment will remain current.

In general we will be tracking behind the most current Google Cloud SDK by two to three weeks. But this will maintain much closer parity to most recent versions. We can also expedite updates of Google Cloud SDK now as needed.

If you reset your project cache and restart your build, you will note (as of this time of writing) that the Google Cloud SDK is now set to version 219.0.1 for the codeship/google-cloud-deployment image.

Drew Kitch
  • 201
  • 1
  • 3