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

Bitbucket pipeline - publish to remote root instead of "build" folder

Eder Wainer February 2, 2021

Hello there. I jut got into the Pipelines feature and Im having a hard time understanding paths. Everytime I run the pipeline below it first creates a "build" folder and then publishes all updated files inside of it. But my app was built in a way that it is very troublesome to run in inside a folder.

Is there a way to force it to publish it to the root of the ftp account?

 

This is the local path of my private repo:
https://coopernet@bitbucket.org/coopernet/features.git

 

Below is the script Im using:

pipelines:

default:

- parallel

- step: name: 'Build and Test'

script: - pipe: atlassian/ftp-deploy:0.3.5

variables:

USER: 'myUser'

PASSWORD: 'myPass'

SERVER: '000.00.000.00'

REMOTE_PATH: '/httpdocs/'

LOCAL_PATH: '${BITBUCKET_CLONE_DIR}'

 

Thanks!

2 answers

0 votes
ktomk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 6, 2021

Sure, pushing the whole git repository into '/httpdocs/' sounds like a real security nightmare.

It is crucible to configure the FTP-upload correctly, e.g. in your case it sounds like that setting

  • REMOTE_PATH: '/httpdocs/'

to a different folder is worth a try, for example if "/" expresses the root of your FTP account:

  • REMOTE_PATH: '/'

If in doubt, consult your hosts support and ask about how to obtain the correct path(s).

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 5, 2021

Hi @Eder Wainer and welcome to the community.

I see that you are using the ftp deploy pipe and you have defined httpdocs as REMOTE_PATH.

Just to make sure that I understand the problem correctly:

  • Is the 'build' folder generated on your remote server, inside the 'httpdocs' folder?
  • Do you generate a folder named 'build' anywhere in your Pipelines build?
  • Do you already have a folder named 'build' in your repo?
  • Does this 'build' folder on your server contain all files of $BITBUCKET_CLONE_DIR?

I can reach out to one of the developers and check whether this is expected behavior or not, I just want to make sure that I have a correct understanding of the issue first.

Kind regards,
Theodora

Suggest an answer

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

Atlassian Community Events