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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,551,671
Community Members
 
Community Events
184
Community Groups

FTP deployment on bitbucket fails

Hi, i have dotnet project and i want to publish that project then deploy to server using ftp, but when i run the pipeline ftp step never ends and its only creates release directory on the server but nothing else, no files under that directory. Could anyone else help me?

Pipeline looks like this:

 

image: mcr.microsoft.com/dotnet/core/sdk:2.2
definitions:
steps:
- step: &Publish
size: 2x
caches:
- dotnetcore
script:
- dotnet publish src/${PROJECT_NAME}/${PROJECT_NAME}.csproj -o release/ --configuration ${CONFIGURATION} /p:EnvironmentName=${ASPNETCORE_ENVIRONMENT}
- pipe: atlassian/ftp-deploy:0.3.7
variables:
USER: $FTP_USERNAME
PASSWORD: $FTP_PASSWORD
SERVER: $FTP_IP
REMOTE_PATH: $FTP_PATH
LOCAL_PATH: $FTP_LOCALPATH

1 answer

0 votes
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 26, 2023

G'day @Aysu Saglam, and welcome to the community!

I suggest enabling debug options in the pipe to generate more verbose logs. This way, you can identify if there was any issue during the FTP deployment.

script:
  - pipe: atlassian/ftp-deploy:0.4.1
    variables:
      USER: '<string>'
      PASSWORD: '<string>'
      SERVER: '<string>'
      REMOTE_PATH: '<string>'
      LOCAL_PATH: '<string>'
      DEBUG: 'true' # Optional

Owh and upgrade the pipe version to use version 0.4.1 to ensure you are using an updated version.

Also, make sure the local path is correct by running a ls -lah {path} command to make sure it exists. Essentially the default local path is {BITBUCKET_CLONE_DIR}.

Cheers,
Syahrul

Hi, thanks for your response.

My local path is : ${BITBUCKET_CLONE_DIR}/,i enabled debug mode and upgraded my ftp version. Here is pipeline logs:

+ LFTP_DEBUG_ARGS=-vvv
+ run_pipe
+ info 'Starting FTP deployment to $FTP_IP:/test/...'
+ echo -e '\e[36mINFO: Starting FTP deployment to $FTP_IP:/test/...\e[0m'
+ set +e
lftp -u $FTP_USER,$FTP_PASSWORD -e 'set ftp:ssl-allow no; mirror -vvv --transfer-all -R /opt/atlassian/pipelines/agent/build/ /test/;quit' $FTP_IP

it stays like that and ftp stage never ends.

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 27, 2023

Hi @Aysu Saglam 

Thanks for the update. I have raised a support ticket for you to continue the investigation. You can view your ticket here, and one of our engineers should get back to you soon.

Cheers,
Syahrul

Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 28, 2023

@Aysu Saglam  hi. 
Here you have a command that generated via pipe workflow:

lftp -u $FTP_USER,$FTP_PASSWORD -e 'set ftp:ssl-allow no; mirror -vvv --transfer-all -R /opt/atlassian/pipelines/agent/build/ /test/;quit' $FTP_IP

Try to execute this command locally first to understand if all works as expected, maybe you will understand the root cause.
As @Syahrul mentioned you could also add running a ls -lah {path} command for additional debug.

Keep in mind ftp-deploy copy files only from your repository local path.

Regards, Igor

Hi, the problem happened because of accessing bitbucket to remote server. We allowed multiple ports not just 21 and problem solved. Thank you guys.

Like Igor Stoyanov likes this

Suggest an answer

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

Atlassian Community Events