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,460,940
Community Members
 
Community Events
176
Community Groups

port number in pipelins for deploy in FTP server in not working

Edited

I'm using atlassian/ftp-deploy:0.3.7 to deploy my code to a remote server.

This is my configuration into bitbucket-pipelines.yml


definitions:
    steps:
        - step: &staging-deployment
              name: Deploy to staging
              deployment: Staging
              image: node:14.15.0
              size: 2x
              caches:
                  - node
              script:
                  - pipe: atlassian/ftp-deploy:0.3.7
                    variables:
                        USER:  $user
                        PASSWORD: $STAGE_KEY
                        SERVER: $serverIP
                        REMOTE_PATH: /www/wwwtravizorycom_857/public/
                        DEBUG: "true"
                        EXTRA_ARGS: "-p 58609"
I'm trying to add the port number in EXTRA_ARGS
based on this documentation 
I can add the port number by using "-p portNumber".
The problem is that the port number is been added at the end of the LOCAL_PATH instead of the SERVER. 
Screenshot 2022-08-05 163346.jpg
Any ideas?

2 answers

1 accepted

0 votes
Answer accepted
Ben Atlassian Team Aug 09, 2022

Hey Amin,

I've noticed that you have not yet received a reply from our Community so I figured I would jump in.

Have you tried to specify the port number within the server address itself in the $serverIp variable?
For instance:
{code}
SERVER: 127.0.0.1:21
{code}

I would also ensure that you make sure that at the server side, the following IP addresses are whitelisted:
https://support.atlassian.com/bitbucket-cloud/docs/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall/

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)

Hey @Ben ,

for some reason whether adding the port number in $serverIp or not, I'm always finding ":" at the end of the $serverIp variable

for example

Screenshot 2022-08-10 093136.jpg

I'm not adding ":", for some reason it keeps showing at the end of the $serverIP

any ideas why that is happening?

regards,

Ben Atlassian Team Aug 10, 2022

Hey Amin,

There's a chance that the variable has not been configured correctly or it is pulling the data from elsewhere and getting confused.

We will need to troubleshoot each element here, I'd suggest trying the following scenarios:

1. Try manually entering the SERVER field without making use of the variable and see if this makes any difference
2. Try entering the SERVER field without variable using the hostname rather than the IP address, try this with both the port number appended to the server address and with the "-P' in the args section seperately

Cheers!

- Ben (Bitbucket Cloud Support)

I am having this exact same issue with the same module, so it's easily reproducible. I added some exclusion args and they don't end up in the path, only the port number does.

EXTRA_ARGS: '-p 455 --exclude=.gitignore --exclude=.git/ --exclude=.vscode/'
LOCAL_PATH: $BITBUCKET_CLONE_DIR
REMOTE_PATH: '/'

Hey @Ben ,

finally, it worked

I'm using atlassian/ftp-deploy:0.3.7  to deploy into KINSTA

based on this documentation SFTP with Kinsta , KINSTA only supports SFTP connections to ensure your data remains safe and encrypted

 

so I switch to atlassian/sftp-deploy:0.5.7 after adding the proper configuration it worked.

Screenshot 2022-08-12 115636.jpg

 

My bitbucket pipeline file looks like this

 

image: atlassian/default-image:3
options:
  docker: true
  size: 2x

definitions:
    services:
        docker:
            memory: 2048 #increasing docker service memory
steps:
        - step: &staging-deployment
              name: Deploy to staging
              deployment: Staging
              image: node:14.15.0
              size: 2x
              caches:
                  - node
              script:
                  - cd wp-content/themes/travizory
                  - npm install
                  - npm run build
                  - rm -rf node_modules
                  - cd ../../../
                  - pipe: atlassian/sftp-deploy:0.5.7
                    variables:
                      USER: '${STAGE_User}'
                      PASSWORD: '${STAGE_KEY}'
                      SERVER: '111.111.111.111'
                      REMOTE_PATH: '/www/wwwtravizorycom_857/public/'
                      LOCAL_PATH: '${BITBUCKET_CLONE_DIR}'
                      DEBUG: 'false'
                      EXTRA_ARGS: '-P 57631'

pipelines:
custom:

staging-deployment:
- step: *staging-deployment

 

Regarding the PORT number,

Screenshot 2022-08-12 122147.jpg

it's normal to look like this in the bitbucket pipeline.

@Anthony Kolka you need to make sure to pass the port number like that :

EXTRA_ARGS: '-P 57631'

 

@Anthony Kolka If you have any questions don't hesitate to ask me.

Regards,

Like Anthony Kolka likes this

How would we also disable the hardcoded refusal to use SSL and add 

ssl:verify-certificate no

instead?

Also, how can you override the hardcoded delete first flag? Not all deployments call for wiping out what exists.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS

Atlassian Community Events