Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket pipeline failed to deploy nodejs to google app engine

jeffrey_chen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 31, 2018

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

螢幕快照 2018-09-01 上午5.47.09.png

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

 

1 answer

0 votes
Jeroen De Raedt
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 16, 2018

This looks like an issue with google Cloud, or at least your configuration of it, rather than something relating to Bitbucket Pipelines. 

Take a look at these tips: https://github.com/GoogleCloudPlatform/nodejs-getting-started/issues/153 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events