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

FTP push after gulp build process Edited

I am having difficulty trying to reconfigure my pipeline with bitbucket.

TL:DR

Before, i used ncftpput and everything worked fine for months with this pipeline:

image: node:9.8.0
pipelines:
branches:
master:
- step:
name: Building
script:
- npm install -g gulp
- npm install --quiet
- gulp --production
- echo "Initiating Push site:Source"
- apt-get update || true
- apt-get install ncftp
- ls -lh
- ncftpput -z -v -u "$FTP_USERNAME" -p "$FTP_PASSWORD" -R ftp.xxxxxx.com / dist/*
- echo "Finished uploading"

But, in de latest try, was returned the error:

+ ncftpput -z -v -u "$FTP_USERNAME" -p "$FTP_PASSWORD" -R ftp.xxxxx.com.br / dist/.
dist/./contato.php: dist/./contato.php: ETA: 0:00 4.10/ 4.10 kB 50.06 MB/s dist/./contato.php: ETA:
**** various lines with tryes to upload *****
ncftpput dist/.: could not send file to remote host.

 So how i wont discovered what happenned before, because nothing was changed in my remote server, i decided to try other alternatives to upload via FTP, and now i have this pipeline:

image: node:9.8.0
pipelines:
branches:
master:
- step:
name: Building
script:
- npm install -g gulp
- npm install --quiet
- gulp --production
- echo "Initiating Push site:Source"
- apt-get update || true
- ls -lh
- pipe: atlassian/ftp-deploy:0.3.1
variables:
USER: $FTP_USERNAME
PASSWORD: $FTP_PASSWORD
SERVER: 'ftp.xxxxxxxx.com'
REMOTE_PATH: '/test'
LOCAL_PATH: 'dist/*'
DEBUG: 'true'
EXTRA_ARGS: '--ignore-size set ftp:list-options -a'

When i run this, the error returned is:

Status: Downloaded newer image for bitbucketpipelines/ftp-deploy:0.3.1
INFO: Starting FTP deployment to ftp.xxxx.com:/test...
+ LFTP_DEBUG_ARGS=-vvv
+ run_pipe
+ info 'Starting FTP deployment to ftp.xxxxx.com:/test...'
+ echo -e '\e[36mINFO: Starting FTP deployment to ftp.xxxxxx.com:/test...\e[0m'
+ set +e
+ lftp -u giov11br,$FTP_PASSWORD -e 'set ftp:ssl-allow no; mirror --delete-first -vvv --ignore-size set ftp:list-options -a -R ./dist/* /test;quit' ftp.xxxxxxx.com
mirror: Access failed: /opt/atlassian/pipelines/agent/build/set: No such file or directory
+ set -e
+ STATUS=0
+ [[ 0 == \0 ]]
+ success 'Deployment finished.'
+ echo -e '\e[32m✔ Deployment finished.\e[0m'
+ exit 0
✔ Deployment finished.

I dont know what i need to do, i think the dist exists because is the same step like before. I have already tried to remove de optional LOCAL_PATH to upload everything, creating de REMOTE_FOLDER with permissions, and the same error occurs.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,038 views 0 3
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