image: atlassian/default-image:3

pipelines:
  default:
    - step:
        name: 'Deployment to Staging'
        deployment: staging
        script:
          - mkdir -p ~/.ssh
          - (umask  077 ; echo $DEPLOY_SSH_KEY | base64 -di > ~/.ssh/id_rsa)
          - cat ~/.ssh/id_rsa
          - ssh -o "StrictHostKeyChecking=no" -i ~/.ssh/id_rsa admin@82.146.37.70 '/var/www/admin/data/www/deploy.sh'
          - echo "Server8 (82.146.37.70) SUCCESS!"
          - ssh -o "StrictHostKeyChecking=no" -i ~/.ssh/id_rsa admin@92.63.193.105 '/var/www/admin/data/www/deploy.sh'
          - echo "Firstvds_92.63.193.105 SUCCESS!"
          - ssh -o "StrictHostKeyChecking=no" -i ~/.ssh/id_rsa admin@92.63.100.175 '/var/www/admin/data/www/deploy.sh'
          - echo "Proy23 SUCCESS!"
          - ssh -o "StrictHostKeyChecking=no" -i ~/.ssh/id_rsa admin@188.120.224.69 '/var/www/admin/data/www/deploy.sh'
          - echo "Proy24 SUCCESS!"