I know nothing about how python comes into play and how to set the version. Any help appreciated.
Getting error:
ERROR: Python 2 is not compatible with the Google Cloud SDK. Please use Python version 3.5 and up.
If you have a compatible Python interpreter installed, you can use it by setting
the CLOUDSDK_PYTHON environment variable to point to it.
branches:
master:
- step:
caches:
- maven
image: maven:3.8.1-openjdk-8
name: Build, stage, and deploy App Engine content
deployment: production
script:
- mvn -D skipTests=true -P useJfrog --settings settings.xml install appengine:stage
- mvn dependency:tree
- ls -la
- ls -la target/appengine-staging/app.yaml
- cat target/appengine-staging/app.yaml
- pipe: atlassian/google-app-engine-deploy:1.1.1
variables:
KEY_FILE: ${xxxx_SERVICE_ACCOUNT_KEY}
PROJECT: 'xxxx'
DEPLOYABLES: 'target/appengine-staging/app.yaml'
VERSION: 'xxxx-${BITBUCKET_BUILD_NUMBER}'
PROMOTE: 'true'
...
Hello @Bruce Wilcox ,
Thank you for reaching out to Atlassian Community!
Could you share which exact command is throwing the Python version error? Was it a command of your step's script or was it the pipe atlassian/google-app-engine-deploy:1.1.1 ?
If it was the pipe, could you please include the DEBUG variable in the pipe definition and share the logs here with us?
script: - pipe: atlassian/google-app-engine-deploy:1.1.1 variables: <rest of your pipe variables> DEBUG: 'true'
Thank you, @Bruce Wilcox !
Patrik S
Thanks for taking an interest in this.
The maven appengine:stage is failing all of a sudden:
mvn -D skipTests=true -P useJfrog --settings settings.xml package appengine:stage
Here is an excerpt from log:
[INFO] Staging the application to: /opt/atlassian/pipelines/agent/build/target/appengine-staging
[INFO] Detected App Engine appengine-web.xml based application.
Apr 20, 2023 7:15:25 PM com.google.cloud.tools.managedcloudsdk.install.Downloader download
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.
ERROR: Python 2 is not compatible with the Google Cloud SDK. Please use Python version 3.5 and up.
If you have a compatible Python interpreter installed, you can use it by setting
the CLOUDSDK_PYTHON environment variable to point to it.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Patrik S I have another Google App Engine project that uses Java 11 and Spring Boot and builds using image: maven:3.8.1-openjdk-11. It still builds and deploys successfully.
It appears that the "sudden" change is actually on the part of the Google CLI/SDK discontinuing support for Python 2.
I still think that Atlassian could provide a great service by recommending Docker images that work for the App Engine use cases.
Again, the steps that the pipeline needs to run back to back are:
script:
- mvn install appengine:stage
- pipe: atlassian/google-app-engine-deploy:1.1.1
I remain stuck and appreciate your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Docker image maven:3.8.3-openjdk-8 got me back up and running.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I use image maven:3.8.3-jdk-11 and it worked
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bruce,
To resolve this issue, you need to install Python 3.5 or higher and set the CLOUDSDK_PYTHON environment variable to point to the location of the Python 3.5 executable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian, could you please direct me to an example on how to do that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How do I install Python on BitBucket cloud?
Are you sure this is a valid answer?
Right now the pipeline is using Docker image:
maven:3.8.1-openjdk-8
This image has maven, java 8, and Python 2.
What image has maven, java 8, and Python 3.5 or higher?
I wish the README.md at:
https://bitbucket.org/atlassian/google-app-engine-deploy/src/master/
would suggest images that work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.