Setting scrutinizer-ci with gcloud

101 views Asked by At

Using gcloud in scrutinizer-ci, I want to automatically deploy to gcp.

There is no information anywhere, but who has something done?

1

There are 1 answers

0
Rei OKawara On
# Create an environment variable for the correct distribution
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"

# Add the Cloud SDK distribution URI as a package source
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list

# Import the Google Cloud Platform public key
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -

# Update the package list and install the Cloud SDK
sudo apt-get -y update && sudo apt-get -y install google-cloud-sdk

#/home/scrutinizer/build/php.info
#vi /home/scrutinizer/build/credential_key.json

gcloud auth activate-service-account --key-file=/home/scrutinizer/build/credential_key.json

thx, I resoled this shell