Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Google Cloud build python not found

Hello,

I'm a software developer and new to GCP. Yesterday I was trying to deploy a simple Spring Boot Application to the App Engine using this tutorial https://medium.com/google-cloud/gcp-deploying-to-app-engine-from-github-using-cloud-build-df2582f968.... I didn't use his code, as I allready have my project set up on Github. It's a simple hello world application.

After pushing a new commit to github, the build is running, but it gets an error

 

 

INFO: Downloading https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz to /root/.cache/google-cloud-tools-java/managed-cloud-sdk/downloads/google-cloud-sdk.tar.gz
Welcome to the Google Cloud CLI!
WARNING: You appear to be running this script as root. This may cause 
the installation to be inaccessible to users other than the root user.
/root/.cache/google-cloud-tools-java/managed-cloud-sdk/LATEST/google-cloud-sdk/install.sh: line 221: python: not found

 

 

Here is my cloudbuild.yaml

 

 

steps:
  - name: maven:3-eclipse-temurin-17-alpine
    entrypoint: mvn
    args: [ "test" ]
  - name: maven:3-eclipse-temurin-17-alpine
    entrypoint: mvn
    args: [ "package", "-Dmaven.test.skip=true","appengine:deploy" ]
  - name: gcr.io/cloud-builders/docker
    args: [ "build", "-t", "gcr.io/$PROJECT_ID/backend", "--build-arg=JAR_FILE=target/backend-0.0.1.jar", "." ]
images: [ "gcr.io/$PROJECT_ID/backend" ]

 

 

3 1 610
1 REPLY 1

Hi @jupper,

Welcome to Google Cloud Community!

I would suggest following these tutorials on building and pushing a Docker image with Cloud Build first then building and testing Java applications as these provide comprehensive steps on how to deploy sample application on Cloud Build using Java and Maven and familiarity on Cloud Build configuration and Artifact Registry repo.

Hope this helps.