Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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 Marketplace Apps & Integrations

Staying organized with Jira: best practices for a better project management

Project managers know this problem: A “mountain of work” lays in front of you, and you don’t know how and where to tackle them. Different to-dos lie ahead, but just one task after the other can be ha...

228 views 2 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