#  Bitbucket Pipeline for Dashboard
image: node:lts

pipelines:
  branches:

    main:
      - step:
          name: 1.Running Initial Tests 
          script:
            - apt-get update -y
            - apt-get install -y zip
            - apt-get install sshpass -y
            - apt-get install -y rsync
            - pwd
            - ls -la
            - echo $NEW_PASSWORD | base64
            - echo $UAT_SERVER_TESTER_USER_NAME | base64
            - echo $UAT_SERVER_TESTER_HOST | base64
            - echo $UAT_SERVER_TESTER_BUILD_PATH | base64
            - sshpass -p "${NEW_PASSWORD}" rsync -rav -e 'ssh -o StrictHostKeyChecking=no -p 22' --exclude='.git/' --exclude='.gitlab-ci.yml' . ${UAT_SERVER_TESTER_USER_NAME}@${UAT_SERVER_TESTER_HOST}:${UAT_SERVER_TESTER_BUILD_PATH}
            - echo success
