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

LOCAL_PATH must be a directory Edited

When running atlassian/aws-s3-deploy:0.2.1 as part of a pipe in a script for a pipeline, what is the mount path. No matter what directory I try to specify whether its the repo name or any of the child directories I always get "LOCAL_PATH must be a directory". When I set LOCAL_PATH="." it uploads nothing to my S3 bucket. It almost seems like nothing is mounting to the docker container.

bitbucket-piplines.yml:

pipelines:
default:
- step:
image: node:9.10.1
caches:
- node
script: # Modify the commands below to build your repository.
- cd react-app
- npm install
- npm run dist
- echo "Building react apps complete!"
- pipe: atlassian/aws-s3-deploy:0.2.1
variables:
AWS_ACCESS_KEY_ID: "<key>"
AWS_SECRET_ACCESS_KEY: "<secret>"
AWS_DEFAULT_REGION: "us-west-2"
S3_BUCKET: "<mybucket>"
LOCAL_PATH: "???" 

 

2 answers

add artifacts code below script may your problem will be solved

                artifacts: # defining the artifacts to be passed to each future step.

                      - dist/**

 

SOLVED: Used "pwd" to figure out the dir structure, and added "- cd .." before the pipe, and everything works.

looks it setting LOCAL_PATH = $(pwd) copies the repo to remote server. This is what I was looking for. 

@Justin Nordstrom  are you able to share the LOCAL_PATH value you set? I am having a similar issue here.

@aftabnaveed 


my-clone-repo
|____test
|____src
       
$BITBUCKET_CLONE_DIR will return you the full path at the top level of your repo. Ex: it would return `/path/to/my-clone-repo`. I've just been using that environment variable as my point of reference in my scripts, and using `cd ../artifacts` to go between my repo and artifacts directories.

 

Hope that helps.

Thank you very much, I did not have the artifact step added. After adding that it worked just fine. Thanks for response any way :-)

Suggest an answer

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

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

155 views 0 1
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