[7.x] [CI] GitHub check details link to test reports and errorlevel (#69157) (#69236)

This commit is contained in:
Victor Martinez 2020-06-16 09:33:17 +01:00 committed by GitHub
parent 216e44acc3
commit 0491bca88b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 4 deletions

View file

@ -76,7 +76,7 @@ pipeline {
}
}
steps{
notifyStatus('Running smoke tests', 'PENDING')
notifyTestStatus('Running smoke tests', 'PENDING')
dir("${BASE_DIR}"){
sh "${E2E_DIR}/ci/run-e2e.sh"
}
@ -95,10 +95,10 @@ pipeline {
}
}
unsuccessful {
notifyStatus('Test failures', 'FAILURE')
notifyTestStatus('Test failures', 'FAILURE')
}
success {
notifyStatus('Tests passed', 'SUCCESS')
notifyTestStatus('Tests passed', 'SUCCESS')
}
}
}
@ -113,5 +113,9 @@ pipeline {
}
def notifyStatus(String description, String status) {
withGithubNotify.notify('end2end-for-apm-ui', description, status, getBlueoceanDisplayURL())
withGithubNotify.notify('end2end-for-apm-ui', description, status, getBlueoceanTabURL('pipeline'))
}
def notifyTestStatus(String description, String status) {
withGithubNotify.notify('end2end-for-apm-ui', description, status, getBlueoceanTabURL('tests'))
}

View file

@ -164,6 +164,7 @@ echo "✅ Setup completed successfully. Running tests..."
# run cypress tests
##################################################
yarn cypress run --config pageLoadTimeout=100000,watchForFileChanges=true
e2e_status=$?
#
# Run interactively
@ -171,3 +172,9 @@ yarn cypress run --config pageLoadTimeout=100000,watchForFileChanges=true
echo "${bold}If you want to run the test interactively, run:${normal}"
echo "" # newline
echo "cd ${E2E_DIR} && yarn cypress open --config pageLoadTimeout=100000,watchForFileChanges=true"
# Report the e2e status at the very end
if [ $e2e_status -ne 0 ]; then
echo "⚠️ Running tests failed."
exit 1
fi