diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0614145931bc2669fd561e94839666dcda852472..a109119dae7f567a9de38c308da751b64487fba4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -187,9 +187,17 @@ test: - > curl --retry 10 --retry-delay 20 --retry-connrefused https://knightly.rc.uab.edu/Shibboleth.sso/Metadata --resolve knightly.rc.uab.edu:443:$FLOATING_IP -kf || FAILED=true + - | + if [ $CI_PIPELINE_SOURCE == 'merge_request_event' ]; then + ssh -o StrictHostKeyChecking=no acctsvc@$FLOATING_IP '[ $(mount | grep "type nfs" | wc -l) -eq 6 ]' || FAILED=true + elif [ $CI_PIPELINE_SOURCE == 'schedule' ]; then + cp "$SSH_KNOWN_HOSTS" ~/.ssh/known_hosts + chmod 644 ~/.ssh/known_hosts + ssh acctsvc@$FLOATING_IP '[ $(mount | grep "type nfs" | wc -l) -eq 6 ]' || FAILED=true + fi - > - ssh -o StrictHostKeyChecking=no acctsvc@$FLOATING_IP '[ $(mount | grep "type nfs" | wc -l) -eq 6 ]' - || FAILED=true + echo "PASS" + && FAILED=true - | if [ "$FAILED" = true ]; then openstack server delete $NEW_INSTANCE_ID