Gitlab-ci issue


I created a .gitlab-ci.yml file to auto deploy to my staging area. This is the file I wrote.

deploy to staging:
environment: staging

  • lftp -p 2222 sftp://$FTPUSER_STAGING:$FTPPASSWD_STAGING@$FTPHOST_STAGING -e "set ssl:verify-certificate no; set sftp:auto-confirm yes; mirror -R . /public_html"
  • master
    when: manual
  • xieles

Mine is a CakePHP project. For some reason, only 3 files in the root folder is getting uploaded to staging. It upload only .gitlab-ci.yml, and .htaccess files. It skipped index.php file and all sub folders. Is there any problem with the .gitlab-ci.yml file


If I read the lftp manual correctly, your mirror -R ./public_html expects both a local and remote public_html directory right?

What kind of runner are you using? shell? You could try to reproduce your script commands in the build directory on your runner to see what happens when manually executing the commands?


There is local and remote directory mentioned. There is a space after .(dot), so it is mirror -R . /public_html same as mirror -R ./ /public_html


Check. Didn’t see that. How about the manual steps?


When I do it manually from the build directory, all files are getting transferred.


The problem seems to be with -R option of mirror. When I change that to --reverse, it works correctly. FTPS deploy to site not working for top-level domain overwite *only* (works for new directories)

Cool, so its solved?


Yes, its fixed.

Very strange though. -R and --reverse are same ( ). Can this be a bug?