# This is an example Starter pipeline configuration
# Use a skeleton to build, test and deploy using manual and parallel steps
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: php:7.2-fpm

pipelines:
  branches:
    develop:
      - step:
          name: 'Start FTP to dentalsystem.codernapps.ro on develop commit'
          script:
            - apt-get update
            - apt-get -qq install git-ftp
            - git config git-ftp.url "ftp://codernapps.ro"
            - git config git-ftp.user $FTP_USERNAME
            - git config git-ftp.password $FTP_PASSWORD
#           init only at first run
#            - git ftp init -vv
#           Everything else
            - git ftp push -vv
#           Clear cache
            - curl http://dentalsystem.codernapps.ro/api/technical/clear_cache
