[jenkins] Make it possible to skip running packaged Xamarin.Mac tests by setting the 'skip-packaged-xamarin-mac-tests' label. (#9170)

Diff is best viewed by ignoring whitespace.
This commit is contained in:
Rolf Bjarne Kvinge 2020-07-24 09:21:31 +02:00 коммит произвёл GitHub
Родитель 7a7c6f6286
Коммит dd1205a222
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 13 добавлений и 7 удалений

20
jenkins/Jenkinsfile поставляемый
Просмотреть файл

@ -837,15 +837,21 @@ timestamps {
stage ("Package XM tests") {
currentStage = "${STAGE_NAME}"
echo ("Building on ${env.NODE_NAME}")
def exitCode = sh (script: "make -C ${workspace}/xamarin-macios/tests package-tests", returnStatus: true)
if (exitCode != 0) {
def skipPackagedXamarinMacTests = getLabels ().contains ("skip-packaged-xamarin-mac-tests")
if (skipPackagedXamarinMacTests) {
echo ("Skipping packaged Xamarin.Mac tests because the label 'skip-packaged-xamarin-mac-tests' was found")
hasXamarinMacTests = false
echoError ("Failed to package Xamarin.Mac tests (exit code: ${exitCode})")
failedStages.add (currentStage)
} else {
def packaged_xm_tests = findFiles (glob: "tests/*.7z")
if (packaged_xm_tests.size () > 0)
uploadFiles ("tests/*.7z", "wrench", virtualPath)
def exitCode = sh (script: "make -C ${workspace}/xamarin-macios/tests package-tests", returnStatus: true)
if (exitCode != 0) {
hasXamarinMacTests = false
echoError ("Failed to package Xamarin.Mac tests (exit code: ${exitCode})")
failedStages.add (currentStage)
} else {
def packaged_xm_tests = findFiles (glob: "tests/*.7z")
if (packaged_xm_tests.size () > 0)
uploadFiles ("tests/*.7z", "wrench", virtualPath)
}
}
}