You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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: './'
./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
I used it like this and it worked:
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.