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

running into "LOCAL_PATH must be a directory." issue

My Build docs step succeeds, then it says ✖ LOCAL_PATH must be a directory. after downloading image for the Deploy step.

My yaml file:

image: python:3.6.7

- step:
name: Build docs
- source ci_scripts/ $BITBUCKET_PIPELINES_BRANCH "doc_result"
- step:
name: Deploy
deployment: production
- pipe: atlassian/aws-s3-deploy:0.2.1
S3_BUCKET: "tools-docs-dist-prod"
ACL: "public-read"
CACHE_CONTROL: "max-age=3600"
EXPIRES: "2018-10-01T00:00:00+00:00"
EXTRA_ARGS: "--follow-symlinks"
DEBUG: "true"

My script is similar to this one here:

2 answers

1 accepted

0 votes
Answer accepted

Hi @gdmacmillan . First I wanted to note that you're using an old version 0.2.1 of the pipe. There is a newer version 0.3.2 available, which has improvements related to your issue.
Second, I'd double check if the doc/$BITBUCKET_PIPELINES_BRANCH directory actually exist after you run your script. Your can do this by checking the Artifacts tab in your build screen. 

OK i switched to the new version but this wasn't the problem. The problem is my build step wasn't creating any artifacts. For one I didn't have a $DOCPUSH variable set which you can see is needed for the main block to run in the referenced script. This is set to true now. Now the main block runs but it stops when it gets to 

if ! { [ $1 = "master" ] || [ $1 = "development" ]; }; then
{ echo "Not one of the allowed branches"; exit 0; }


Since $1 is the environment variable $BITBUCKET_PIPELINES_BRANCH passed to the script at runtime i need to have it say master or development depending on a push to whichever branch triggered the build. I had set the variable manually in the settings. Is there a default variable which has this already set in bitbucket_pipelines?

for example in travis there is TRAVIS_BRANCH:

  • for push builds, or builds not triggered by a pull request, this is the name of the branch.
  • for builds triggered by a pull request this is the name of the branch targeted by the pull request.
  • for builds triggered by a tag, this is the same as the name of the tag (TRAVIS_TAG).

Sure, there are BITBUCKET_BRANCH  and BITBUCKET_TAG environment variables available to you. There are also a bunch of other useful variables, you can fine the full list here: Variables in pipelines.

Like gdmacmillan likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

125 views 1 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