Hi,
I want to upload the dist files of an internal python library a GCP bucket. To do so I followed these instructions to put together the step below:
definitions:
services:
google-cloud-sdk:
image: google/cloud-sdk:latest
[...]
- step: &rabbitmq-wrapper
name: RabbitMQ wrapper
image: python:3.7.3
condition:
changesets:
includePaths:
- "common-libs/rabbitmq_wrapper/*"
- "common-libs/rabbitmq_wrapper/**"
caches:
- pip
services:
- google-cloud-sdk
script:
- cd common-libs/rabbitmq_wrapper/
- pip install mock==4.0.2 coverage==5.1
- pip install -r requirements.txt
- coverage run -m unittest discover test
- coverage report --omit "test/*.py"
- python setup.py sdist bdist_wheel
- apt-get update && apt-get install -y gettext-base
- envsubst < sa-genus.dist.json > service-account.json
- gcloud auth activate-service-account --key-file=service-account.json
- gsutil cp dist/* gs://mybucket/
[...]
All runs ok until the gcloud call that returns "gcloud: command not found". What am I doing differently from the official documentation? I am assuming that services provide access to a set of tools that is not included in the step image, is that right?
Hello,
Service images are running alongside your build container, like a database or service that you can connect to. However, this doesn't mean that the service container's commands can be used directly. The dependencies needed to run these commands should exist in the image used in the step.
A few suggestion I can give for your use case:
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.