I tried to do a CI/CD demo on bitbucket pipeline with google app engine to propose my company using this solution stack.
It works on the python project from official document. But doesn't work with nodejs.
The nodejs app engine code is from https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/master/appengine/hello-world/standard
Here's the error message

I've set the env variables follow this document.
Here's my bitbucket-pipelines.yml
Note: I can successfully deploy to app engine using gcloud shell without bitbucket pipeline.
image: node:8.9.4
pipelines:
default:
- step:
caches:
- node
script: # Modify the commands below to build your repository.
# Install Google Cloud SDK
- curl -o /tmp/google-cloud-sdk.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-214.0.0-linux-x86_64.tar.gz
- tar -xvf /tmp/google-cloud-sdk.tar.gz -C /tmp/
- /tmp/google-cloud-sdk/install.sh -q
- source /tmp/google-cloud-sdk/path.bash.inc
- gcloud -v
- python --version
- npm install
# set GCLOUD_CLIENT_SECRET environment variable
- echo ${GOOGLE_CLIENT_SECRET} > client-secret.json
- gcloud auth activate-service-account --key-file client-secret.json
- gcloud --verbosity=error app deploy app.yaml