diff --git a/Jenkinsfile b/Jenkinsfile index 349d0773c5df0..dec030c777fef 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,6 +30,16 @@ node { sh 'yarn kbn bootstrap' } + stage('Unit Test') { + echo "Starting unit test..." + def utResult = sh returnStatus: true, script: 'CI=1 GCS_UPLOAD_PREFIX=fake yarn test:jest -u --ci' + + if (utResult != 0) { + currentBuild.result = 'FAILURE' + } + + junit 'target/junit/TEST-Jest Tests*.xml' + } } } catch (e) { echo 'This will run only if failed'