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?
@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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please add
DEBUG: 'true'
to variables to show more details.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.