image: atlassian/default-image:3

pipelines:
  custom:
    init:
      - step:
          name: Step 0
          script:
            - echo "triggering init manually.";
      - step:
          name: Step 1
          trigger: manual
          caches:
            - composer
          script:
            - apt-get update && apt-get install -y unzip
            - apt-get -qq install git-ftp
            - git ftp init --username $FTP_USERNAME_STAG --passwd $FTP_PASSWRD_STAG ftp://104.152.108.173/
               
    
    push:
    - step:
          name: Step 0
          script:
            - echo "triggering push manually.";
    - step:
        name: Step 1
        trigger: manual
        caches:
          - composer
        script:
          - apt-get update && apt-get install -y unzip
          - apt-get -qq install git-ftp
          - git ftp push --username $FTP_USERNAME_STAG --passwd $FTP_PASSWRD_STAG ftp://104.152.108.173/
          - echo "Files are updated successfully";

  
   
  default:
  - step:
          name: Step 0
          script:
            - echo "triggering push default.";
  - step:
        name: Step 1
        trigger: manual
        caches:
          - composer
        script:
          - apt-get update && apt-get install -y unzip
          - apt-get -qq install git-ftp
          - git ftp push --username $FTP_USERNAME_STAG --passwd $FTP_USERNAME_STAG1 ftp://104.152.108.173/

