I am trying to setup a pipeline to my SFTP to deploy my react project. However I get the following error:
Couldn't canonicalize: No such file or directory
Unable to canonicalize path "/static"
This is a subfolder in my build folder. So seems like I can't write subfolder.
This is my script:
deployment: staging
script:
- pipe: atlassian/sftp-deploy:0.5.2
variables:
USER: '{{user}}'
SERVER: '{{server}}'
REMOTE_PATH: '/'
LOCAL_PATH: 'build/*'
DEBUG: 'true'
Had the same issue, realized it's an issue with SFTP and recursive copies. Issue applies only to first-level directories that don't exist in the destination SFTP... If this is the case, then it won't bother creating it... If it DOES exist, then it works fine copying and has no problems copying recursively from that 2nd level onwards.
Not really a solve, but here is the workaround that's doing the trick for me, it's basically simulating moving up one level in the path to perform the SFTP.
SO LET'S SAY you have:
script:
- pipe: atlassian/sftp-deploy:0.5.3
variables:
SERVER: $ftpserver
USER: $user
PASSWORD: $password
REMOTE_PATH: '/path/on/my-destination'
THE WORKAROUND would be:
script:
- mkdir ../my-destination
- mv * ../my-destination
- mv ../my-destination .
- pipe: atlassian/sftp-deploy:0.5.3
variables:
SERVER: $ftpserver
USER: $user
PASSWORD: $password
REMOTE_PATH: '/path/on'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.