This is an automated email from the ASF dual-hosted git repository.

mck pushed a commit to branch 3.x
in repository https://gitbox.apache.org/repos/asf/cassandra-java-driver.git


The following commit(s) were added to refs/heads/3.x by this push:
     new a7553ccde Add Jenkinsfile-asf for OSS CI
a7553ccde is described below

commit a7553ccdeacb23efff454747463d4550b04a03bf
Author: Siyao (Jane) He <siya...@uci.edu>
AuthorDate: Tue Aug 13 16:58:29 2024 -0700

    Add Jenkinsfile-asf for OSS CI
    
     patch by Siyao (Jane) He; reviewed by Mick Semb Wever for CASSANDRA-19832
---
 Jenkinsfile-asf                     | 73 +++++++++++++++++++++++++++++++++++++
 Jenkinsfile => Jenkinsfile-datastax |  0
 ci/run-tests.sh                     |  9 +++++
 3 files changed, 82 insertions(+)

diff --git a/Jenkinsfile-asf b/Jenkinsfile-asf
new file mode 100644
index 000000000..a3429d805
--- /dev/null
+++ b/Jenkinsfile-asf
@@ -0,0 +1,73 @@
+#!groovy
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+pipeline {
+    agent {
+        label 'cassandra-small'
+    }
+
+    triggers {
+        // schedules only run against release branches (i.e. 3.x, 4.x, 4.5.x, 
etc.)
+        cron(branchPatternCron().matcher(env.BRANCH_NAME).matches() ? 
"@weekly" : "")
+    }
+
+    stages {
+        stage('Matrix') {
+            matrix {
+                axes {
+                    axis {
+                        name 'TEST_JAVA_VERSION'
+                        values 'openjdk@1.8.0-292', 'openjdk@1.11.0-9'
+                    }
+                    axis {
+                        name 'SERVER_VERSION'
+                        values '2.1', '3.0', '3.11', '4.0'
+                    }
+                }
+                stages {
+                    stage('Tests') {
+                        agent {
+                            label 'cassandra-medium'
+                        }
+                        steps {
+                            script {
+                                executeTests()
+                                junit testResults: 
'**/target/surefire-reports/TEST-*.xml', allowEmptyResults: true
+                                junit testResults: 
'**/target/failsafe-reports/TEST-*.xml', allowEmptyResults: true
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
+
+def executeTests() {
+    sh "docker run -e TEST_JAVA_VERSION=${TEST_JAVA_VERSION} -e 
SERVER_VERSION=${SERVER_VERSION} -v \$(pwd):/home/docker/cassandra-java-driver 
apache.jfrog.io/cassan-docker/apache/cassandra-java-driver-testing-ubuntu2204 
cassandra-java-driver/ci/run-tests.sh"
+}
+
+// branch pattern for cron
+// should match 3.x, 4.x, 4.5.x, etc
+def branchPatternCron() {
+    ~"((\\d+(\\.[\\dx]+)+))"
+}
+
diff --git a/Jenkinsfile b/Jenkinsfile-datastax
similarity index 100%
rename from Jenkinsfile
rename to Jenkinsfile-datastax
diff --git a/ci/run-tests.sh b/ci/run-tests.sh
new file mode 100755
index 000000000..b1bf20144
--- /dev/null
+++ b/ci/run-tests.sh
@@ -0,0 +1,9 @@
+#!/bin/bash -x
+
+. ~/env.txt
+printenv | sort
+cd $(dirname "$(readlink -f "$0")")/..
+mvn -B -V install -DskipTests -Dmaven.javadoc.skip=true
+jabba use ${TEST_JAVA_VERSION}
+printenv | sort
+mvn -B -V verify -T 1 -Dcassandra.version=${SERVER_VERSION} -Ddse=false 
-Dmaven.test.failure.ignore=true -Dmaven.javadoc.skip=true;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to