-2

在scrutinizer-ci 中使用gcloud,我想自动部署到gcp。

任何地方都没有信息,但谁做了什么?

4

1 回答 1

1
# 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,我解决了这个外壳

于 2018-01-26T07:33:22.060 回答