# 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.
# This is a CI/CD pipeline configuration for TDS
# Use to build, test and deploy to A2 hosting using SSH and manual steps
# -----
# Specify a custom docker image from Docker Hub as your build environment (Can use multiple in 
# same pipeline).
image: atlassian/default-image:2

pipelines:
 branches:
   master:
   
     - step:
         name: Deploy to Test
         image: madshansen/docker-git-ftp:latest #Change to docker image capable of doing testing
         deployment: Test
         script:
           - echo "Deployed to test"
  
     - step:
         name: Deploy to Staging
         deployment: Staging
         trigger: manual
         script:
           - pipe: atlassian/ssh-run:0.3.0
             variables:
               SSH_USER: 'root'
               SERVER: '206.189.31.28'
               PORT: '22'
               COMMAND: 'deploy/TchiboDeployStaging.sh'
           - echo "Deployed to staging"
                    
     - step:
         name: Deploy to Production
         deployment: Production
         trigger: manual
         script:
           - pipe: atlassian/ssh-run:0.3.0
             variables:
               SSH_USER: 'root'
               SERVER: '206.189.31.28'
               PORT: '22'
               COMMAND: 'deploy/TchiboDeployLive.sh'
           - echo "Deployed to Production"