Reputation: 1
I've deployed a Docker image intended to bootstrap a simple Node.js backend. I have tried pulling locally and running a container instance and the image stored in Cloud Registry works perfectly.
Now I am trying to use said image from an Azure DevOps pipeline, in order to deploy said container in an App Engine flex.
I tried to deploy it using the following scripts
- script: |
gcloud auth activate-service-account --key-file=$(GOOGLE_APPLICATION_CREDENTIALS)
gcloud config set project $(GOOGLE_PROJECT_ID)
displayName: 'Activate Google Cloud Auth and Set Project'
- script : |
gcloud app deploy --image-url [host]/[project]/[image]:[tag] --no-promote
displayName: 'Deploy container in app engine flex environment'
From the pipeline running on a directory containing an app.yaml file, it seems to try to use the code from the directory instead of the image:
descriptor: [/home/vsts/work/1/s/app.yaml]
source: [/home/vsts/work/1/s]
And the error in cloud logging is: Permission denied to enable service [appengineflex.googleapis.com]
On the other hand, if I try to run the command locally I get the following error.
gcloud app deploy --image-url [host]/[project]/[image]:[tag] --no-promote
ERROR: An app.yaml (or appengine-web.xml) file is required to deploy this directory as an App Engine application. Create an app.yaml file using the directions at https://cloud.google.com/appengine/docs/flexible/reference/app-yaml (App Engine flexible environment)
ERROR: (gcloud.app.deploy) [/current-directory] could not be identified as a valid source directory or file.
UPDATE: The permissions were updated and now I receive another error running gcloud app deploy from local machine.
Error: An internal error occurred while processing task /app-engine-flex/insert_flex_deployment/flex_create_resources>2023-03-02T08:49:11.470Z2797.xd.0: Network 'default' does not exist
Any help would be greatly appreciated!
Upvotes: 0
Views: 611