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

Pipeline hung at ftp upload

chmaurer September 8, 2021

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
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 9, 2021

@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

chmaurer September 9, 2021

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?

Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 9, 2021

Please add 

DEBUG: 'true'

to variables to show more details. 

chmaurer September 9, 2021

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.

Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 9, 2021

@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

chmaurer September 13, 2021

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.

Like amisitechpartner likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events