This commit is contained in:
15
.drone.yml
15
.drone.yml
@@ -125,17 +125,14 @@ steps:
|
|||||||
- export VM_IP=192.168.178.$((211 + DRONE_BUILD_NUMBER % 44))
|
- export VM_IP=192.168.178.$((211 + DRONE_BUILD_NUMBER % 44))
|
||||||
- export RUN_ID=$(echo $DRONE_COMMIT_SHA | head -c 8)
|
- export RUN_ID=$(echo $DRONE_COMMIT_SHA | head -c 8)
|
||||||
- export API_URL="http://e2e$${RUN_ID}.192.168.178.201.nip.io"
|
- export API_URL="http://e2e$${RUN_ID}.192.168.178.201.nip.io"
|
||||||
|
- export SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
|
||||||
- echo "VM_IP=$VM_IP RUN_ID=$RUN_ID API_URL=$API_URL"
|
- echo "VM_IP=$VM_IP RUN_ID=$RUN_ID API_URL=$API_URL"
|
||||||
- echo "Waiting for VM to be reachable..."
|
- echo "Waiting for VM to be reachable..."
|
||||||
- timeout 60 bash -c "until sshpass -p \"$E2E_VM_PASSWORD\" ssh debian@$VM_IP 'echo ok'; do sleep 5; done"
|
- timeout 60 bash -c "until sshpass -p \"$E2E_VM_PASSWORD\" ssh $SSH_OPTS debian@$VM_IP 'echo ok'; do sleep 5; done"
|
||||||
- echo "=== SCP script ==="
|
- sshpass -p "$E2E_VM_PASSWORD" scp $SSH_OPTS scripts/e2e-test.sh debian@$VM_IP:/tmp/e2e-test.sh
|
||||||
- sshpass -p "$E2E_VM_PASSWORD" scp scripts/e2e-test.sh debian@$VM_IP:/tmp/e2e-test.sh
|
- sshpass -p "$E2E_VM_PASSWORD" ssh $SSH_OPTS debian@$VM_IP "chmod +x /tmp/e2e-test.sh"
|
||||||
- echo "=== chmod ==="
|
- sshpass -p "$E2E_VM_PASSWORD" ssh $SSH_OPTS debian@$VM_IP "REPO_URL=https://gitea.gilmour109.de/gilmour109/calchat.git COMMIT_SHA=$DRONE_COMMIT_SHA API_URL=$API_URL bash /tmp/e2e-test.sh"
|
||||||
- sshpass -p "$E2E_VM_PASSWORD" ssh debian@$VM_IP "chmod +x /tmp/e2e-test.sh"
|
- sshpass -p "$E2E_VM_PASSWORD" scp $SSH_OPTS debian@$VM_IP:/tmp/e2e-results.txt /tmp/e2e-results.txt
|
||||||
- echo "=== running e2e-test.sh ==="
|
|
||||||
- sshpass -p "$E2E_VM_PASSWORD" ssh debian@$VM_IP "REPO_URL=https://gitea.gilmour109.de/gilmour109/calchat.git COMMIT_SHA=$DRONE_COMMIT_SHA API_URL=$API_URL bash /tmp/e2e-test.sh"
|
|
||||||
- echo "=== SCP results ==="
|
|
||||||
- sshpass -p "$E2E_VM_PASSWORD" scp debian@$VM_IP:/tmp/e2e-results.txt /tmp/e2e-results.txt
|
|
||||||
|
|
||||||
- name: notify_failure
|
- name: notify_failure
|
||||||
image: drillster/drone-email
|
image: drillster/drone-email
|
||||||
|
|||||||
Reference in New Issue
Block a user