michaelsembwever commented on code in PR #88:
URL: https://github.com/apache/cassandra-builds/pull/88#discussion_r1066987943


##########
jenkins-dsl/cassandra_job_dsl_seed.groovy:
##########
@@ -370,72 +394,70 @@ cassandraBranches.each {
     def branchName = it
     def jobNamePrefix = "Cassandra-${branchName}".replaceAll('cassandra-', '')
 
-    /**
-     * Main branch artifacts and eclipse-warnings job
-     */
-    matrixJob("${jobNamePrefix}-artifacts") {
-        disabled(false)
-        using('Cassandra-template-artifacts')
-        axes {
-            if (!(branchName ==~ /cassandra-[2-3].\d+/)) {
-                jdk('jdk_1.8_latest','jdk_11_latest')
-            } else {
-                jdk('jdk_1.8_latest')
+    if (exists(branchName, 'artifacts')) {
+        /**
+         * Main branch artifacts and eclipse-warnings job
+         */
+        matrixJob("${jobNamePrefix}-artifacts") {
+            disabled(false)
+            using('Cassandra-template-artifacts')
+            axes {
+                jdk(jdks(branchName, 'artifacts'))
+                if (arm64_enabled) {
+                    label('label', slaveLabel, slaveArm64Label)
+                } else {
+                    label('label', slaveLabel)
+                }
             }
-            if (arm64_enabled) {
-                label('label', slaveLabel, slaveArm64Label)
-            } else {
-                label('label', slaveLabel)
+            configure { node ->
+                node / scm / branches / 'hudson.plugins.git.BranchSpec' / 
name(branchName)
             }
-        }
-        configure { node ->
-            node / scm / branches / 'hudson.plugins.git.BranchSpec' / 
name(branchName)
-        }
-        steps {
-            shell("""
-                    ./cassandra-builds/build-scripts/cassandra-artifacts.sh ;
-                    wget --retry-connrefused --waitretry=1 
"\${BUILD_URL}/timestamps/?time=HH:mm:ss&timeZone=UTC&appendLog" -qO - > 
console.log || echo wget failed ;
-                    xz console.log
-                  """)
-        }
-        publishers {
-            publishOverSsh {
-                server('Nightlies') {
-                    transferSet {
-                        sourceFiles("console.log.xz, 
build/apache-cassandra-*.tar.gz, build/apache-cassandra-*.jar, 
build/apache-cassandra-*.pom, build/cassandra*.deb, build/cassandra*.rpm")
-                        
remoteDirectory("cassandra/${branchName}/${jobNamePrefix}-artifacts/\${BUILD_NUMBER}/\${JOB_NAME}/")
+            steps {
+                shell("""
+                        
./cassandra-builds/build-scripts/cassandra-artifacts.sh ;
+                        wget --retry-connrefused --waitretry=1 
"\${BUILD_URL}/timestamps/?time=HH:mm:ss&timeZone=UTC&appendLog" -qO - > 
console.log || echo wget failed ;
+                        xz console.log
+                      """)
+            }
+            publishers {
+                publishOverSsh {
+                    server('Nightlies') {
+                        transferSet {
+                            sourceFiles("console.log.xz, 
build/apache-cassandra-*.tar.gz, build/apache-cassandra-*.jar, 
build/apache-cassandra-*.pom, build/cassandra*.deb, build/cassandra*.rpm")
+                            
remoteDirectory("cassandra/${branchName}/${jobNamePrefix}-artifacts/\${BUILD_NUMBER}/\${JOB_NAME}/")
+                        }
+                        retry(9, 5000)
                     }
-                    retry(9, 5000)
+                    failOnError(false)
                 }
-                failOnError(false)
-            }
-            matrixPostBuildScript {
-              buildSteps {
-                markBuildUnstable(false)
-                postBuildStep {
-                    executeOn('BOTH')
-                    stopOnFailure(false)
-                    
results(['SUCCESS','UNSTABLE','FAILURE','NOT_BUILT','ABORTED'])
-                    buildSteps {
-                      shell {
-                        // docker needs to (soon or later) prune its volumes 
too, but that can only be done when the agent is idle
-                        // if the agent is busy, just prune everything that is 
older than maxJobHours
-                        command("""
-                            echo "Cleaning project…"; git clean -xdff ;
-                            echo "Cleaning processes…" ;
-                            if ! pgrep -af "cassandra-builds/build-scripts" ; 
then pkill -9 -f org.apache.cassandra. || echo "already clean" ; fi ;
-                            echo "Pruning docker…" ;
-                            if pgrep -af "cassandra-builds/build-scripts" ; 
then docker system prune --all --force --filter "until=${maxJobHours}h" || true 
; else  docker system prune --all --force --volumes || true ;  fi;
-                            echo "Reporting disk usage…"; df -h ;
-                            echo "Cleaning tmp…";
-                            find . -type d -name tmp -delete 2>/dev/null ;
-                            find /tmp -type f -atime +2 -user jenkins -and 
-not -exec fuser -s {} ';' -and -delete 2>/dev/null || echo clean tmp failed ;
-                            echo "For test report and logs see 
https://nightlies.apache.org/cassandra/${branchName}/${jobNamePrefix}-artifacts/\${BUILD_NUMBER}/\${JOB_NAME}/";
-                        """)
-                      }
+                matrixPostBuildScript {
+                  buildSteps {
+                    markBuildUnstable(false)
+                    postBuildStep {
+                        executeOn('BOTH')
+                        stopOnFailure(false)
+                        
results(['SUCCESS','UNSTABLE','FAILURE','NOT_BUILT','ABORTED'])
+                        buildSteps {
+                          shell {
+                            // docker needs to (soon or later) prune its 
volumes too, but that can only be done when the agent is idle
+                            // if the agent is busy, just prune everything 
that is older than maxJobHours
+                            command("""
+                                echo "Cleaning project…"; git clean -xdff ;
+                                echo "Cleaning processes…" ;
+                                if ! ( pgrep -xa docker || pgrep -af 
"cassandra-builds/build-scripts" ) ; then pkill -9 -f org.apache.cassandra. || 
echo "already clean" ; fi ;

Review Comment:
   the `pgrep -xa docker ||` is needed before 
[CASSANDRA-18133](https://issues.apache.org/jira/browse/CASSANDRA-18133)



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to