I want to be able to have access to my gcloud console through droneio. but im stuck at authentication and managing secrets.
I want to set a secret into a json and then authenticate that json.
and this is what I have so far
gcloud:
image: google/cloud-sdk
environment:
- 'GOOGLE_TOKEN=${GOOGLE_TOKEN}'
commands:
- echo ${GOOGLE_TOKEN} > /tmp/credentials.json
- gcloud auth activate-service-account --key-file /tmp/credentials.json
- gcloud config set project joule-eed41
secrets: [google_token]
and this comes out
+ echo > /tmp/credentials.json
+ gcloud auth activate-service-account --key-file /tmp/credentials.json
ERROR: (gcloud.auth.activate-service-account) Could not read json file /tmp/credentials.json: No JSON object could be decoded```