Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Varun Prasad P September 30, 2020

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: java
env: flex

handlers:
- url: /.*
  script: this field is required, but ignored

 

1 answer

1 accepted

1 vote
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 30, 2020

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

Varun Prasad P September 30, 2020

Thank You :) It worked like a charm.

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 2, 2020

That's great to hear! Glad to have helped!

geekgalore
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!
October 31, 2022

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

geekgalore
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!
October 31, 2022

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.

Like Theodora Boudale likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events