Deployments to Google Cloud Storage

Issue #13190 resolved
Hideaki Iwazumi
created an issue

I'd like to add how to deploy to Google Cloud Storage with Bitbucket Pipelines. https://confluence.atlassian.com/bitbucket/examples-of-integrations-for-bitbucket-pipelines-818579233.html

===

Deploy static website with s3_website https://youtu.be/57pwPxJer1E?list=PLzvRQMJ9HDiT-KJHqyY-79dpmIo9lrMcy

Comments (13)

  1. cesare soldini

    Hey Phil, thank you, that's very helpful! I must have missed it.

    My target would be to upload to Google Cloud Storage, but I guess it's a one-line change.

    thanks, cesare

  2. Philip Hodder staff

    Hmmm... I'm not sure if we have documentation available for Google Cloud Storage. I suspect Josh's link originally pointed here: https://confluence.atlassian.com/bitbucket/bitbucket-pipelines-integrations-826868162.html

    The guide Google provides for Pipelines integration is also only for Google App Engine. I suspect the best work approach for the time being would be to set up the auth as suggested in the Google App Engine integration guide and then follow instructions for Google Cloud Storage CLI setup.

    Google App Engine + Bitbucket Pipelines: https://cloud.google.com/solutions/continuous-delivery-bitbucket-app-engine

    Google Cloud Storage CLI: https://cloud.google.com/storage/docs/quickstart-gsutil

    Beyond that I'm unsure as I haven't had a proper play around with the Google Cloud Suite yet.

  3. Antônio Malheiros

    @Philip Hodder unfortunately Josh's link doesn't has any information about google cloud storage.

    i will try later something like that, trying to copy the files directly to the storage.

    image: python:3.5.1
    
    pipelines:
      branches:
        master:
          - step:
              script:
                - apt-get update # required to install zip
                - apt-get install -y zip # required for packaging up the application
                # Downloading the Google Cloud SDK
                - curl -o /tmp/google-cloud-sdk.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-155.0.0-linux-x86_64.tar.gz
                - tar -xvf /tmp/google-cloud-sdk.tar.gz -C /tmp/
                - /tmp/google-cloud-sdk/install.sh -q
                - source /tmp/google-cloud-sdk/path.bash.inc
                - gcloud -v
                # package up the application for deployment
                - zip -r /tmp/artifact.zip * 
                - gsutil -m cp -r /tmp/artifact.zip gs://my-bucket
    
  4. Log in to comment