ERROR: (gcloud.app.deploy) [/opt/atlassian/pipelines/agent/build/app.yaml] does not exist
Asked by Varun Prasad P:

I am trying to deploy a spring boot microservices application to Google App Engine from Bitbucket Pipelines. I am getting this below error after commiting the code,

*INFO: Setting up environment.*   
echo "${KEY_FILE}" \| base64 -d \>\> /tmp/key-file.json  
gcloud auth activate-service-account --key-file /tmp/key-file.json --quiet --verbosity=warning  
Activated service account credentials for: \[testproject-iamserviceaccoun@testproject.iam.gserviceaccount.com\]  
gcloud config set project testproject --quiet --verbosity=warning  
Updated property \[core/project\].

*INFO: Starting deployment to GCP app engine...*   
gcloud app --quiet deploy 'app.yaml' --verbosity=warning  
**ERROR: (gcloud.app.deploy) \[/opt/atlassian/pipelines/agent/build/app.yaml\] does not exist.
? Deployment failed.**

Please help me to solve this issue.

**Build Tool - Maven**

**bitbucket-pipelines.yml**

    pipelines:  default:     - step:         name: Deploy to Google cloud        deployment: test        script:           - pipe: atlassian/google-app-engine-deploy:0.7.3            variables:               KEY_FILE: $KEY_FILE              PROJECT: 'testproject'

I am trying to deploy a spring boot microservices application to Google App Engine from Bitbucket Pipelines. I am getting this below error after commiting the code,

*INFO: Setting up environment.*   
echo "${KEY_FILE}" \| base64 -d \>\> /tmp/key-file.json  
gcloud auth activate-service-account --key-file /tmp/key-file.json --quiet --verbosity=warning  
Activated service account credentials for: \[testproject-iamserviceaccoun@testproject.iam.gserviceaccount.com\]  
gcloud config set project testproject --quiet --verbosity=warning  
Updated property \[core/project\].

*INFO: Starting deployment to GCP app engine...*   
gcloud app --quiet deploy 'app.yaml' --verbosity=warning  
**ERROR: (gcloud.app.deploy) \[/opt/atlassian/pipelines/agent/build/app.yaml\] does not exist.
? Deployment failed.**

Please help me to solve this issue.

**Build Tool - Maven**

**bitbucket-pipelines.yml**

    pipelines:  default:     - step:         name: Deploy to Google cloud        deployment: test        script:           - pipe: atlassian/google-app-engine-deploy:0.7.3            variables:               KEY_FILE: $KEY_FILE              PROJECT: 'testproject'

**src/main/appengine/app.yaml**

    runtime: javaenv: flexhandlers:- url: /.*  script: this field is required, but ignored


Answers:
author: Theodora Boudale
body: Hello,

Based on the info you posted here, I believe the reason for the error is that the file app.yaml doesn't exist at the root of the repo, but in a directory which hasn't been specified.

If the path of this file in your repo is src/main/appengine/app.yaml, can you adjust the pipe definition as follows, to specify the path of the file?

```
- pipe: atlassian/google-app-engine-deploy:0.7.3
? variables: 
? ? KEY_FILE: $KEY_FILE
? ? PROJECT: 'testproject'
? ? DEPLOYABLES: 'src/main/appengine/app.yaml'
```

Please feel free to let me know if this works or if you're still having issues.

Kind regards,  
Theodora

comments: author: Varun Prasad P
body: Thank You :) It worked like a charm.


author: Theodora Boudale
body: That's great to hear! Glad to have helped!


author: geekgalore
body: This seems to only work for paths in the repo, but not for paths in Artifacts (from prev step).

Any idea?

See screenshot where the env DEPLOYABLES is populated with the correct path from the artifact, but down at the descriptor it shows some generic app.yaml file instead of the one specified in the DEPLOYABLES variable.

The deployment crashes for Google not finding the correct .dll file.

![pipe to gae.png](https://community.atlassian.com/t5/image/serverpage/image-id/223487i8AD8721A0FC4046B/image-size/large?v=v2&px=999 "pipe to gae.png")


author: geekgalore
body: Forgive me guys. I was using an old outdated image (0.2.1) for the pipe (copy/pasted from tutorials).

Changed to 1.1.1 and all is working as expected.


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

google