Search code examples
gitlabgitlab-ci

Use Gitlab Pipeline to push data to ftpserver


I want to deploy to a ftp server using a Gitlab pipeline. I tried this code:

deploy: // You can name your task however you like
    stage: deploy
    only:
        - master
        deploy:
  script:
    - apt-get update -qq && apt-get install -y -qq lftp

But I get a error message. What is the best way to do this? :)


Solution

  • Got it :)

      image: mwienk/docker-git-ftp
    
    
        deploy_all:
          stage: deploy
          script:
            - git config git-ftp.url "ftp://xx.nl:21/web/new.xxx.nl/public_html"
            - git config git-ftp.password "xxx"
            - git config git-ftp.user "xxxx"
            - git ftp init
            #- git ftp push  -m "Add new content"
    
          only:
            - master