@@ -140,7 +140,6 @@ def getReviewState(){
140140 return reviewState
141141}
142142def PRDraftCheck (){
143- def type;
144143 withCredentials([usernameColonPassword(credentialsId : ' 550650ab-ee92-4d31-a3f4-91a11d5388a3' , variable : ' Credentials' )]) {
145144 PrObj = sh (returnStdout : true , script :'''
146145 curl -u $Credentials -X GET ''' + githubAPIUrl+ ''' /pulls/$CHANGE_ID
@@ -150,6 +149,16 @@ def PRDraftCheck(){
150149 return jsonObj. draft
151150}
152151
152+ def isPRUITest (){
153+ withCredentials([usernameColonPassword(credentialsId : ' 550650ab-ee92-4d31-a3f4-91a11d5388a3' , variable : ' Credentials' )]) {
154+ PrObj = sh (returnStdout : true , script :'''
155+ curl -u $Credentials -X GET ''' + githubAPIUrl+ ''' /pulls/$CHANGE_ID
156+ ''' )
157+ }
158+ def jsonObj = new JsonSlurperClassic (). parseText(PrObj . toString(). trim())
159+ return jsonObj. body. contains(' [x] Run UI tests' )
160+ }
161+
153162def runCypressE2e (){
154163 script{
155164 copyRPM ' Release' ,' 10.0-6'
@@ -199,6 +208,7 @@ def runCypressE2e(){
199208 def output= readFile ' data-hub/marklogic-data-hub-central/ui/e2e/e2e_err.log'
200209 if (output. contains(" npm ERR!" )){
201210 // currentBuild.result='UNSTABLE';
211+ error ' cypress test failed. Tests might run succesfully or with some failures.'
202212 }
203213
204214 junit ' **/e2e/**/*.xml'
@@ -234,7 +244,7 @@ void PreBuildCheck() {
234244 sh ' exit 1'
235245 }
236246
237- if (! isChangeInUI()){env. NO_UI_TESTS = true }
247+ if (! isChangeInUI() && ! isPRUITest() ){env. NO_UI_TESTS = true }
238248
239249 }
240250 def obj= new abortPrevBuilds();
0 commit comments