diff --git a/buildenv b/buildenv index 67f1ee1..efbb10f 100644 --- a/buildenv +++ b/buildenv @@ -35,16 +35,17 @@ dir="$1" pfx="$2" chk="$1/$2_check.log" -set -x start_line=$(cat "${chk}" | egrep -n '^Failed checks were:' | awk -F':' '{ print $1 }') if [ $? -eq 0 ]; then failures=$(cat "${chk}" | tail +${start_line} | head -2 | tail -1 | wc -w) - if [ ${failures} -gt 4 ]; then - exit 1 + if [ ${failures} -eq 0 ]; then + return $ZOPEN_TEST_STATUS_ALL_PASSED + elif [ ${failures} -gt 4 ]; then + return $ZOPEN_TEST_STATUS_SOME_PASSED else - exit 0 + return $ZOPEN_TEST_STATUS_MOST_PASSED fi fi -exit 1 +return $ZOPEN_TEST_STATUS_ERROR } diff --git a/cicd.groovy b/cicd.groovy index 58e08dc..1a9c539 100644 --- a/cicd.groovy +++ b/cicd.groovy @@ -10,6 +10,8 @@ node('linux') } stage('Build') { - build job: 'Port-Pipeline', parameters: [string(name: 'PORT_GITHUB_REPO', value: 'https://github.com/ZOSOpenTools/m4port.git'), string(name: 'PORT_DESCRIPTION', value: 'M4 is an implementation of the traditional Unix macro processor.' )] + build job: 'Port-Pipeline', parameters: [string(name: 'PORT_GITHUB_REPO', value: 'https://github.com/ZOSOpenTools/m4port.git'), + string(name: 'PORT_DESCRIPTION', value: 'M4 is an implementation of the traditional Unix macro processor.' ), + booleanParam(name: 'RUN_TESTS', value: true) ] } }