image: atlassian/default-image:3

pipelines:
  branches:
    staging:
      - step:
          name: Deploy to dev
          deployment: dev
          script:
            - apt-get update && apt-get install -y openssh-client
            - mkdir -p ~/.ssh
            - echo "$SSH_KEY_B64" | base64 -d > ~/.ssh/pipelines_id
            - chmod 600 ~/.ssh/pipelines_id
            - ssh -i ~/.ssh/pipelines_id -o StrictHostKeyChecking=no -p "$SSH_PORT" "$SSH_USER@$SSH_HOST" "bash /var/www/html/dp2/backend_v2.1/deploy/staging.sh"
#kmom