I
I
Ilya Beloborodov2018-08-15 08:42:39
Software Deployment
Ilya Beloborodov, 2018-08-15 08:42:39

Gitlab CI. Deploy to ftp, deploy only changes, or at least exclude the folder?

I have a .gitlab-ci.yml file:

deploy:
  script:
    - apt-get update -qq && apt-get install -y -qq lftp
    - lftp -c "set ftp:ssl-allow no; open -u $USERNAME,$PASSWORD $HOST; mirror -Rnev ./ /www/example.com --ignore-time --parallel=10 --exclude-glob .git* --exclude .git/"
  only:
    - master

Naturally, when I push to the master, the entire branch is loaded via ftp.
I added the vendor folder to gitignore, so it weighs 100mb, and the deployment takes more than 10 minutes. I uploaded it directly to ftp. But when deploying, gitlab deletes this folder, since it is not in the turnip.
Ideally, I would like only changes to be deployed, or at worst, completely ignoring the vendor folder

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Beloborodov, 2018-09-07
@kowap

deploy:
  script:
    - apt-get update -qq && apt-get install -y -qq lftp
    - lftp -c "set ftp:ssl-allow no; open -u $USERNAME,$PASSWORD $HOST; mirror -Rnev ./ /www/example.com --ignore-time --parallel=10 --exclude-glob .git* --exclude .git/ --exclude vendor/ --exclude frontend/web/sitemap.xml --exclude frontend/web/assets/ --exclude frontend/web/uploads/"
  only:
    - master

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question