I had a bit of a wrong understanding how pipelines in bitbucket exactly work, I figured out I could just download the google-cloud sdk and give commands through the pipeline.
image: google/cloud-sdk:latest
pipelines:
default:
- step:
name: "Start build instance"
script:
- echo ${GCLOUD_JSON_KEY} > client-secret.json
- gcloud auth activate-service-account --key-file client-secret.json
- gcloud config set project $project-name
- 'gcloud compute instances start build-serve --zone=america-west4-b'
CLICK HERE to find out more related problems solutions.