Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

1 accepted

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.

Like JldlsLopez likes this

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

add artifacts code below script may your problem will be solved

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

                      - dist/**

 

Suggest an answer

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

Bitbucket Pipelines Runners is now in open beta

We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...

3,941 views 68 21
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