Skip to content

Commit

Permalink
[CI] GitHub check details link to test reports and errorlevel (#69157)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Jun 16, 2020
1 parent 7e32841 commit 88eed98
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .ci/end2end.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand All @@ -95,10 +95,10 @@ pipeline {
}
}
unsuccessful {
notifyStatus('Test failures', 'FAILURE')
notifyTestStatus('Test failures', 'FAILURE')
}
success {
notifyStatus('Tests passed', 'SUCCESS')
notifyTestStatus('Tests passed', 'SUCCESS')
}
}
}
Expand All @@ -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'))
}
7 changes: 7 additions & 0 deletions x-pack/plugins/apm/e2e/run-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,17 @@ echo "✅ Setup completed successfully. Running tests..."
# run cypress tests
##################################################
yarn cypress run --config pageLoadTimeout=100000,watchForFileChanges=true
e2e_status=$?

#
# Run interactively
##################################################
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

0 comments on commit 88eed98

Please sign in to comment.