Tag gcloud images with the stage permalink they deployed to, so developers can pull down the "production" image.
Check the "build with GCR" checkbox on the project edit page.
Images will be built using gcloud container build submit
, which can be slow for large projects.
If the file upload takes too long or you have a custom cloudbuild.yaml, use build triggers instead and
notify samson of the finished builds via the build api.
- enable cloudbuild api
- create a gcloud service account with "Cloud Container Builder" and "Storage Object Creator"
- download credentials for that account
- run
gcloud auth activate-service-account --key-file <YOUR-KEY>
on the samson host - run
gcloud config set account $(jq -r .client_email < <YOUR-KEY>)
on the samson host
GCLOUD_PROJECT
- project to useGCLOUD_ACCOUNT
- account to useGCLOUD_OPTIONS
- additional commandline optionsGCLOUD_IMAGE_TAGGER
- set totrue
to enable tagging on deploy