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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,558,948
Community Members
 
Community Events
184
Community Groups

How should I set the LOCAL_PATH variable correctly?

Edited

I hope you are doing well! I'm facing a problem when trying to deploy using Bitbucket pipeline.

The project is a React project at version 18.2.0 and its files are in the frontend folder.

 

bitbucket-pipelines.yml

image: atlassian/default-image:3

# Workflow Configuration

pipelines:

  branches:

    staging:

      - parallel:

        - step:

            name: Build and Test

            script:

              - npm install --prefix ./frontend/ --legacy-peer-deps

              - npm audit fix --force --prefix ./frontend/

              - npm audit fix --force --prefix ./frontend/

              - npm run build --prefix ./frontend/

            artifacts:

              - ./frontend/build/**

      - step:

          name: Deploy to Staging

          deployment: Staging

          script:

            - pipe: atlassian/scp-deploy:0.3.3

              variables:

                USER: $USER

                SERVER: $SERVER

                REMOTE_PATH: '/var/www/html'

                LOCAL_PATH: './'
 
The error that I am not able to solve is related to the LOCAL_PATH folder.
./frontend/build/*
No such file or directory
./build/*
No such file or directory
./
error: unexpected filename: .
build
No such file or directory
$BITBUCKET_CLONE_DIR
/var/www/html/build: Permission denied
.
error: unexpected filename: .
/
error: unexpected filename:

 

Thanks in advance for any help

2 answers

1 accepted

I used it like this and it worked:

 

artifacts:
  - frontend/build/**
...
LOCAL_PATH: 'frontend/build/*'
0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 20, 2022

Hey Rodrigo,

When you run a pipelines build, the working directory is the clone directory of the repository itself: /opt/atlassian/pipelines/agent/build

If you need to access files within a folder called "react" for instance, I'd suggest using the following format "/react".

If you are still having issues navigating to the correct folder, I'd suggest running the following command in the build so you can view the folder structure accordingly:

ls -lah

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events