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

LOCAL_PATH must be a directory

Justin Nordstrom February 12, 2019

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

1 vote
Answer accepted
Justin Nordstrom February 12, 2019
SOLVED: Used "pwd" to figure out the dir structure, and added "- cd .." before the pipe, and everything works.
oquidave March 5, 2019

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

Like Alexei Olivero Márquez likes this
aftabnaveed May 30, 2019

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

Justin Nordstrom May 30, 2019

@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
aftabnaveed May 31, 2019

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

1 vote
bizoticsdev April 17, 2019

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
AUG Leaders

Atlassian Community Events