Unable to deploy java project to appengine via bitbucket pipeline gradle

I triend to deploy java project to bitbucket pipeline via gradle, however it shows authentication problem though I have used service account. Here is my bitbucket-pipelines.yaml file content - 

image: java:8

- step:
script: # Modify the commands below to build your repository.
# Downloading the Google Cloud SDK
- curl -o /tmp/google-cloud-sdk.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-155.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
# Authenticating with the service account key file
- echo $GCLOUD_API_KEYFILE | base64 --decode --ignore-garbage > ./gcloud-api-key.json
- gcloud auth activate-service-account --key-file gcloud-api-key.json
# Linking to the Google Cloud project
- gcloud config set project $GCLOUD_PROJECT
- gcloud components install app-engine-java
- ./gradlew clean aUpdate


And the error is - 

The following URL can be used to authenticate: https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force&client_id=550516889912.apps.googleusercontent.com&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&scope=https://www.googleapis.com/auth/appengine.admin%20https://www.googleapis.com/auth/cloud-platformAttempting to open it in your browser now.Unable to open browser. Please open the URL above and copy the resulting code.Please enter code: Encountered a problem: No line foundPlease see the logs [/tmp/appcfg3713234273442692917.log] for further information.Daemon vm is shutting down... The daemon has exited normally or was terminated in response to a user interrupt.----- End of the daemon log -----FAILURE: Build failed with an exception.* What went wrong:Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)* Try:Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


Hoping to get reply really very soon. Thank you 

1 answer

Im having same issue, any luck ?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

1,961 views 7 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you