0

I've been trying to get bitbucket pipeline deploy to Google cloud php app. But I keep getting a missing python executable error.Here's the script I have to install Google cloud SDK:

image: php:7.1.3

pipelines:
default:
- step:
    caches:
      - composer
    script:
    # Downloading the Google Cloud SDK
      - curl -O -J https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-155.0.0-linux-x86_64.tar.gz
      - tar -xvf google-cloud-sdk-155.0.0-linux-x86_64.tar.gz -C /tmp/
      - /tmp/google-cloud-sdk/install.sh -q
      - source /tmp/google-cloud-sdk/path.bash.inc
      - gcloud -v

And get's stuck with this error:

To use the Google Cloud SDK, you must have Python installed and on your PATH. As an alternative, you may also set the CLOUDSDK_PYTHON environment variable

to the location of your Python executable.

Any help would be appreciated

1 Answers1

1

You are using a PHP image (Docker image), which obviously does not include Python. Therefore, you either have to find another image which includes PHP and Python, or build one yourself. Building your own can be as simple as what is described in https://stackoverflow.com/a/45963743/4715679

BlueM
  • 3,658
  • 21
  • 34