How to resolve conflict between local app.yaml and remote one in pipeline GCP?

Hi, everybody.

I have a scenario where I develop a GAE app in my machine (local), then commit it to Bitbucket, which has a pipeline integration with GCP.

My problem is a conflict in the file app.yaml.

In Bitbucket, I have to comment the application and version tags in app.yaml:

# application: devop-sportsys
# version: 1
runtime: python27
api_version: 1
threadsafe: true

So the pipeline process is sucessfull. Otherwise, the command gcloud shows this error:

gcloud app deploy -q app.yaml

ERROR: (gcloud.app.deploy) The [application] field is specified in file

[/opt/atlassian/pipelines/agent/build/app.yaml]. This field is not used by gcloud

and must be removed. Project name should instead be specified either by `gcloud

config set project MY_PROJECT` or by setting the `--project` flag on individual

command executions.

But if I comment the tags, GAE Laucher locally doesn't reconize the project and I have to uncomment.


So I change the file app.yaml many times. When I change the file locally, git commit it to Bitbucket and the pipeline process fails.

bitbucket-pipelines.yml

image: google/cloud-sdk

pipelines:
branches:
master:
- step:
script:
- gcloud auth activate-service-account devop-sportsys@appspot.gserviceaccount.com --key-file DEVOP-SportSys-228f797382d8.json
- gcloud app deploy -q app.yaml
- gcloud app deploy -q queue.yaml

How to solve this inconvenience?

0 answers

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 06, 2018 in Bitbucket

Do you use Bitbucket Cloud and Jira Cloud? If so, let us know!

Hi Community, I'm Julia and I'm on the Jira Software Cloud marketing team!  We're looking for companies or teams using Bitbucket Cloud and Jira Software Cloud. If your team fits the t...

154 views 6 3
Join discussion

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