marcoabreu commented on a change in pull request #17999: For mxnet-validation 
pipeline, require sanity build to complete successfully before running other 
build pipelines.
URL: https://github.com/apache/incubator-mxnet/pull/17999#discussion_r406888223
 
 

 ##########
 File path: ci/Jenkinsfile_utils.groovy
 ##########
 @@ -261,6 +261,41 @@ def assign_node_labels(args) {
   NODE_UTILITY = args.utility
 }
 
+def sanity_build_running(pr) {
+    def retVal = "UNKNOWN"
+    try {
+        def prSanityBuild = 
Jenkins.instance.getItem("mxnet-validation").getItem("sanity").getItem(pr)
+        if (prSanityBuild.isBuilding() || prSanityBuild.isInQueue()) {
+            echo "Sanity build " + prSanityBuild.getLastBuild().number + " 
currently running"
+            retVal = "RUNNING"
+        } else {
+            retVal = prSanityBuild.getLastBuild().result.toString()
+        }
+    } catch (checkError) {
+        echo "Caught exception trying to find sanity build for this PR, 
continuing build without delay."
+    }
+    return retVal
+}
+
+def wait_for_sanity_builds() {
+    if (env.CHANGE_ID && env.JOB_NAME.lastIndexOf("PR-") != -1) {
+        echo "This is a pull request (PR-${env.CHANGE_ID}), checking for 
running sanity build."
+        // sleep to make sure sanity job is created
+        sleep(10)
 
 Review comment:
   Awesome!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to