You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/04/10 16:50:39 UTC

[GitHub] [incubator-mxnet] josephevans commented on a change in pull request #17999: For mxnet-validation pipeline, require sanity build to complete successfully before running other build pipelines.

josephevans 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_r406843879
 
 

 ##########
 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:
   Refactored to just use a new build pipeline. No sleep or having to check on other build pipelines.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services