Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

Pipeline hung at ftp upload

I have created my first pipeline from a Java-Maven-project. I can do a nice build, I can use the artifacts to load them into the relevant "Download" section of my repo.

 

However, I want to provide the build output for users on a different server. I want to upload the files via FTP. I am using the https://bitbucket.org/atlassian/ftp-deploy Tool. I think I have set up everything correctly in my yml which looks like this:

image: hbongen/openjfx-maven:latest

pipelines:
default:
- step:
name: Build and Test
caches:
- maven
script:
- mvn -B verify --file pom.xml -Djavafx-location=/usr/share/java/openjfx/jre/lib/ext/jfxrt.jar
after-script:
- pipe: atlassian/ftp-deploy:0.3.6
variables:
USER: $ftp_test_user
PASSWORD: $ftp_test_pw
SERVER: $ftp_test_host
REMOTE_PATH: /
LOCAL_PATH: /opt/atlassian/pipelines/agent/build/target
EXTRA_ARGS: "--exclude=antrun/ --exclude=classes/ --exclude=generated-sources/ --exclude=generated-test-sources/ --exclude=maven-archiver/ --exclude=maven-status/ --exclude=surefire-reports/ --exclude=test-classes/

 

However, upon executing the pipeline, the FTP upload hangs with the info message

INFO: Starting FTP deployment to $ftp_test_host:/...

 

Can anybody explain this behaviour and point me to the right direction?

1 answer

0 votes

@chmaurer  Hi. Nothing is wrong. When this pipe start executing, it prints you this info message, which includes SERVER and REMOTE_PATH variables. Deploy means upload.

Regards, Igor

Hi Igor, yes thanks. I guess I have not stated my question right: After waiting for one minute, I still cannot see any updates to the upload status, but the files to be uploaded are only approx. 30mb in size... So I guess this is not how it should be? Or how long could an ftp upload take in your opinion?

Please add 

DEBUG: 'true'

to variables to show more details. 

Hi Igor, thanks for your suggestion. I did it, the output is after a few seconds:

INFO: Starting FTP deployment to $ftp_test_host:/...
+ echo -e '\e[36mINFO: Starting FTP deployment to $ftp_test_host:/...\e[0m'
+ set +e
+ lftp -u '$ftp_test_user,$ftp_test_pw' -e 'set ftp:ssl-allow no; mirror --delete-first -vvv --exclude=antrun/ --exclude=classes/ --exclude=generated-sources/ --exclude=generated-test-sources/ --exclude=maven-archiver/ --exclude=maven-status/ --exclude=surefire-reports/ --exclude=test-classes/ --exclude=original--3.0.0-SNAPSHOT.jar -R /opt/atlassian/pipelines/agent/build/target /;quit' $ftp_test_host

After approx. 2 min I am stopping the pipeline as nothing happens any mroe.

@chmaurer one of possible reasons is that you have problems with `lftp`
Maybe this
lftp-hangs-on-connecting 
or this 
how-do-i-get-lftp-to-use-ssl-tls-security-mechanism-from-the-command-line 
can help you.

Regards, Igor

Unfortunately this did not help me. And my build minutes got used up for this month while trying to get things working.

Unfortunately I switched over to gitlab, where things seem to be working like a charm. Debugging output was much better over there, there I was able to figure things out and to get it working.

Suggest an answer

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

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

147 views 2 4
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