It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bitbucket Pipelines how to copy full repo to S3

I'm using aws-s3-deploy to setup pipelines for my bitbucket repo. I want to configure the pipeline's LOCAL_PATH variable to copy everything in my repo to S3. I have several folders in the top level of my repo, so I want to be able to copy that full top level, preserving the top level folders and their hierarchy. My bitbucket-pipelines.yml file is setup as such: 

image: python:3.5.1
pipelines:

  branches:

    master:

      - step:

        script:

          - pipe: atlassian/aws-s3-deploy:0.2.1

            variables:

              AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID

              AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY

              AWS_DEFAULT_REGION: "us-east-1"

              S3_BUCKET: $s3_bucket

              LOCAL_PATH: <I want this to be everything in repo>

              #DELETE_FLAG: "true"

 

1 answer

1 vote

Hi Annelise,

Pipelines copies the entire contents of your repository for each build. So you should be able to use the BITBUCKET_CLONE_DIR variable in order to indicate the files to update.

image: python:3.5.1
pipelines:
branches:
master:
- step:
script:
- pipe: atlassian/aws-s3-deploy:0.2.1
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: "us-east-1"
S3_BUCKET: $s3_bucket
LOCAL_PATH: $BITBUCKET_CLONE_DIR # This is the base directory of your repository.
#DELETE_FLAG: "true"

Thanks,

Phil

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Atlassian supported Jenkins integration for Bitbucket Server

We’ve been building a plugin to integrate Bitbucket Server and Jenkins CI, and I’m excited to announce that our alpha is ready to download and install. It lets you seamlessly configure a Jenkins job ...

439 views 0 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you