ERROR: Job failed: exit code 1 on FTP deploy

Hello,

I’m trying to deploy my code to hosting using this .gitlab-ci.yml:

deploy:
  script:
    - apt-get update -qq && apt-get install -y -qq lftp
    - lftp -c "set ftp:ssl-allow no; open -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST; mirror -v $FTP_SOURCE $FTP_DESTINATION --reverse --ignore-time --parallel=10 --exclude-glob .git* --exclude .git/"
  environment:
    name: production
  only:
    - master

but it always stops with “ERROR: Job failed: exit code 1”, here is a piece from last runner log:

...
Transferring file `system/vendor/sebastian/version/.php_cs'
Making directory `system/vendor/psy/psysh/test/fixtures/mixed/.psysh'
Transferring file `system/vendor/psy/psysh/test/fixtures/project/.psysh.php'
Transferring file `system/vendor/symfony/http-foundation/Tests/File/Fixtures/.unknownextension'
Transferring file `system/vendor/symfony/http-foundation/Tests/File/Fixtures/directory/.empty'
ERROR: Job failed: exit code 1

I tried to run the lftp command locally works well though.

Any suggestion from my issue above? Thanks.

NB: The error looks to occur only on composer’s vendor folder, in some reason I need to put it on repo which actually is not recommended.

I fixed my issue by put –no-symlinks in my lftp command which I noticed from logs that there is a lot of errors on mentioned symbolic link.

I am getting same error
- lftp -u $USERNAME,$PASSWORD $HOST -d -e “mirror -Rc --no-symlinks dist/ /site/wwwroot”;

<— 226 Transfer complete.
—> QUIT
<— 221 Goodbye.
---- Closing control socket
ERROR: Job failed: exit code 1

can you post your command after adding –no-symlinks

Thank you

1 Like