Created
December 16, 2020 17:26
Revisions
-
ripiuk created this gist
Dec 16, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ image: <your_image> pipelines: default: - step: name: <description> deployment: <your_deployment_name> image: google/cloud-sdk:320.0.0-alpine script: # on linux you can use `$ base64 -w 0 < ~/.google_app_credentials.json` to generate $GCP_KEY_FILE # then you should add it to <your_deployment_name> variables on bitbucket to be able to use it here - echo "${GCP_KEY_FILE}" | base64 -d >> /tmp/key-file.json - gcloud auth activate-service-account --key-file=/tmp/key-file.json --quiet - gcloud config set project <your_project> --quiet # sync everything from the `./<your_directory>` dir # gsutil rsync documentation: https://cloud.google.com/storage/docs/gsutil/commands/rsync - gsutil -m rsync -r -d -c -u ./<your_directory> gs://<bucket_name>/<directory_path>