This is an automated email from the ASF dual-hosted git repository.
mck pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-builds.git
The following commit(s) were added to refs/heads/master by this push:
new 2242db2 Pipeline together the unit test builds, and generate slack
and email notifications.
2242db2 is described below
commit 2242db275d5fa1fa1ed71e563d00142787e36b93
Author: mck <[email protected]>
AuthorDate: Sun Jan 12 20:57:18 2020 +0100
Pipeline together the unit test builds, and generate slack and email
notifications.
Requires builds to archive their test reports so the pipeline can aggregate
them.
ref:
https://lists.apache.org/thread.html/rc87bf39c6400dfd1fd0177e7ed2f552b89889e7c41aae4e56db5e294%40%3Cdev.cassandra.apache.org%3E
---
jenkins-dsl/cassandra_job_dsl_seed.groovy | 72 +++++++++--
jenkins-dsl/cassandra_pipeline.groovy | 195 ++++++++++++++++++++++++++++++
2 files changed, 257 insertions(+), 10 deletions(-)
diff --git a/jenkins-dsl/cassandra_job_dsl_seed.groovy
b/jenkins-dsl/cassandra_job_dsl_seed.groovy
index 48f2570..2911b1f 100644
--- a/jenkins-dsl/cassandra_job_dsl_seed.groovy
+++ b/jenkins-dsl/cassandra_job_dsl_seed.groovy
@@ -13,8 +13,8 @@ def slaveLabel = 'cassandra'
if(binding.hasVariable("CASSANDRA_SLAVE_LABEL")) {
slaveLabel = "${CASSANDRA_SLAVE_LABEL}"
}
-// The dtest-large target needs to run on >=32G slaves, so we provide an "OR"
list of those servers
-def largeSlaveLabel = 'cassandra6||cassandra7'
+// The dtest-large target needs to run on >=32G slaves
+def largeSlaveLabel = 'cassandra-large'
if(binding.hasVariable("CASSANDRA_LARGE_SLAVE_LABEL")) {
largeSlaveLabel = "${CASSANDRA_LARGE_SLAVE_LABEL}"
}
@@ -46,7 +46,7 @@ if(binding.hasVariable("CASSANDRA_ANT_TEST_TARGETS")) {
testTargets = "${CASSANDRA_ANT_TEST_TARGETS}".split(",")
}
// Dtest test targets
-def dtestTargets = ['dtest', 'dtest-novnode', 'dtest-offheap', 'dtest-large']
+def dtestTargets = ['dtest', 'dtest-novnode', 'dtest-offheap' /*,
'dtest-large'*/] // Skipping dtest-large until there are agents with >=32GB ram
available
if(binding.hasVariable("CASSANDRA_DTEST_TEST_TARGETS")) {
dtestTargets = "${CASSANDRA_DTEST_TEST_TARGETS}".split(",")
}
@@ -168,7 +168,12 @@ job('Cassandra-template-test') {
shell("git clean -xdff ; git clone -b ${buildsBranch} ${buildsRepo}")
}
publishers {
- archiveJunit('**/TEST-*.xml') {
+ archiveArtifacts {
+ pattern('build/test/**/TEST-*.xml')
+ allowEmpty()
+ fingerprint()
+ }
+ archiveJunit('build/test/**/TEST-*.xml') {
testDataPublishers {
publishTestStabilityData()
}
@@ -215,7 +220,11 @@ job('Cassandra-template-dtest') {
shell("git clean -xdff ; git clone -b ${buildsBranch} ${buildsRepo} ;
git clone ${dtestRepo}")
}
publishers {
- archiveArtifacts('test_stdout.txt')
+ archiveArtifacts {
+ pattern('**/test_stdout.txt,**/nosetests.xml')
+ allowEmpty()
+ fingerprint()
+ }
archiveJunit('nosetests.xml') {
testDataPublishers {
publishTestStabilityData()
@@ -271,7 +280,12 @@ matrixJob('Cassandra-template-cqlsh-tests') {
shell("git clean -xdff ; git clone ${dtestRepo}")
}
publishers {
- archiveJunit('cqlshlib.xml, nosetests.xml') {
+ archiveArtifacts {
+ pattern('**/cqlshlib.xml,**/nosetests.xml')
+ allowEmpty()
+ fingerprint()
+ }
+ archiveJunit('**/cqlshlib.xml,**/nosetests.xml') {
testDataPublishers {
publishTestStabilityData()
}
@@ -409,7 +423,7 @@ cassandraBranches.each {
////////////////////////////////////////////////////////////
/**
- * Parameterized Dev Branch `ant test-all`
+ * Parameterized Dev Branch `ant test`
*/
testTargets.each {
def targetName = it
@@ -452,7 +466,12 @@ testTargets.each {
shell("./cassandra-builds/build-scripts/cassandra-unittest.sh
${targetName}")
}
publishers {
- archiveJunit('**/TEST-*.xml') {
+ archiveArtifacts {
+ pattern('build/test/**/TEST-*.xml')
+ allowEmpty()
+ fingerprint()
+ }
+ archiveJunit('build/test/**/TEST-*.xml') {
testDataPublishers {
publishTestStabilityData()
}
@@ -508,7 +527,11 @@ job('Cassandra-devbranch-dtest') {
shell("sh ./cassandra-builds/docker/jenkins/jenkinscommand.sh \$REPO
\$BRANCH \$DTEST_REPO \$DTEST_BRANCH ${buildsRepo} ${buildsBranch}
\$DOCKER_IMAGE")
}
publishers {
- archiveArtifacts('test_stdout.txt')
+ archiveArtifacts {
+ pattern('**/test_stdout.txt,**/nosetests.xml')
+ allowEmpty()
+ fingerprint()
+ }
archiveJunit('nosetests.xml') {
testDataPublishers {
publishTestStabilityData()
@@ -570,7 +593,12 @@ matrixJob('Cassandra-devbranch-cqlsh-tests') {
shell('./pylib/cassandra-cqlsh-tests.sh $WORKSPACE')
}
publishers {
- archiveJunit('cqlshlib.xml, nosetests.xml') {
+ archiveArtifacts {
+ pattern('**/cqlshlib.xml,**/nosetests.xml')
+ allowEmpty()
+ fingerprint()
+ }
+ archiveJunit('**/cqlshlib.xml,**/nosetests.xml') {
testDataPublishers {
publishTestStabilityData()
}
@@ -580,3 +608,27 @@ matrixJob('Cassandra-devbranch-cqlsh-tests') {
}
}
}
+
+
+/**
+ * Parameterized Dev Branch Pipeline
+ */
+pipelineJob('Cassandra-devbranch') {
+ description(jobDescription)
+ logRotator {
+ numToKeep(50)
+ artifactNumToKeep(1)
+ }
+ parameters {
+ stringParam('REPO', 'apache', 'The github user/org to clone cassandra
repo from')
+ stringParam('BRANCH', 'trunk', 'The branch of cassandra to checkout')
+ stringParam('DTEST_REPO', "${dtestRepo}", 'The cassandra-dtest repo
URL')
+ stringParam('DTEST_BRANCH', 'master', 'The branch of cassandra-dtest
to checkout')
+ }
+ definition {
+ cps {
+ script(readFileFromWorkspace('Cassandra-Job-DSL',
'jenkins-dsl/cassandra_pipeline.groovy'))
+ sandbox()
+ }
+ }
+}
diff --git a/jenkins-dsl/cassandra_pipeline.groovy
b/jenkins-dsl/cassandra_pipeline.groovy
new file mode 100644
index 0000000..d0ac4a2
--- /dev/null
+++ b/jenkins-dsl/cassandra_pipeline.groovy
@@ -0,0 +1,195 @@
+
+pipeline {
+ agent any
+ stages {
+ stage('Initialisation') {
+ steps {
+ cleanWs()
+ }
+ }
+ stage('Testing') {
+ parallel {
+ stage('stress') {
+ steps {
+ warnError('Tests unstable') {
+ build job: 'Cassandra-devbranch-stress-test',
parameters: [string(name: 'REPO', value: params.REPO), string(name: 'BRANCH',
value: params.BRANCH)]
+ }
+ }
+ post {
+ success {
+ warnError('missing test xml files') {
+ copyArtifacts projectName:
'Cassandra-devbranch-stress-test', optional: true, target: 'stress-test',
fingerprintArtifacts: true, selector: lastSuccessful(stable: false)
+ }
+ }
+ unstable {
+ warnError('missing test xml files') {
+ copyArtifacts projectName:
'Cassandra-devbranch-stress-test', optional: true, target: 'stress-test',
fingerprintArtifacts: true, selector: lastSuccessful(stable: false)
+ }
+ }
+ }
+ }
+ stage('fqltool') {
+ steps {
+ warnError('Tests unstable') {
+ build job: 'Cassandra-devbranch-fqltool-test',
parameters: [string(name: 'REPO', value: params.REPO), string(name: 'BRANCH',
value: params.BRANCH)]
+ }
+ }
+ post {
+ success {
+ warnError('missing test xml files') {
+ copyArtifacts projectName:
'Cassandra-devbranch-fqltool-test', optional: true, target: 'fqltool-test',
fingerprintArtifacts: true, selector: lastSuccessful(stable: false)
+ }
+ }
+ unstable {
+ warnError('missing test xml files') {
+ copyArtifacts projectName:
'Cassandra-devbranch-fqltool-test', optional: true, target: 'fqltool-test',
fingerprintArtifacts: true, selector: lastSuccessful(stable: false)
+ }
+ }
+ }
+ }
+ stage('JVM forking') {
+ steps {
+ warnError('Tests unstable') {
+ build job: 'Cassandra-devbranch-test-jvm-dtest-forking',
parameters: [string(name: 'REPO', value: params.REPO), string(name: 'BRANCH',
value: params.BRANCH)]
+ }
+ }
+ post {
+ success {
+ warnError('missing test xml files') {
+ copyArtifacts projectName:
'Cassandra-devbranch-test-jvm-dtest-forking', optional: true, target:
'test-jvm-dtest-forking', fingerprintArtifacts: true, selector:
lastSuccessful(stable: false)
+ }
+ }
+ unstable {
+ warnError('missing test xml files') {
+ copyArtifacts projectName:
'Cassandra-devbranch-test-jvm-dtest-forking', optional: true, target:
'test-jvm-dtest-forking', fingerprintArtifacts: true, selector:
lastSuccessful(stable: false)
+ }
+ }
+ }
+ }
+ stage('units') {
+ steps {
+ warnError('Tests unstable') {
+ build job: 'Cassandra-devbranch-test', parameters:
[string(name: 'REPO', value: params.REPO), string(name: 'BRANCH', value:
params.BRANCH)]
+ }
+ }
+ post {
+ success {
+ warnError('missing test xml files') {
+ copyArtifacts projectName: 'Cassandra-devbranch-test',
optional: true, target: 'test', fingerprintArtifacts: true, selector:
lastSuccessful(stable: false)
+ }
+ }
+ unstable {
+ warnError('missing test xml files') {
+ copyArtifacts projectName: 'Cassandra-devbranch-test',
optional: true, target: 'test', fingerprintArtifacts: true, selector:
lastSuccessful(stable: false)
+ }
+ }
+ }
+ }
+ stage('long units') {
+ steps {
+ warnError('Tests unstable') {
+ build job: 'Cassandra-devbranch-long-test', parameters:
[string(name: 'REPO', value: params.REPO), string(name: 'BRANCH', value:
params.BRANCH)]
+ }
+ }
+ post {
+ success {
+ warnError('missing test xml files') {
+ copyArtifacts projectName:
'Cassandra-devbranch-test-long', optional: true, target: 'test-long',
fingerprintArtifacts: true, selector: lastSuccessful(stable: false)
+ }
+ }
+ unstable {
+ warnError('missing test xml files') {
+ copyArtifacts projectName:
'Cassandra-devbranch-test-long', optional: true, target: 'test-long',
fingerprintArtifacts: true, selector: lastSuccessful(stable: false)
+ }
+ }
+ }
+ }
+ stage('burn') {
+ steps {
+ warnError('Tests unstable') {
+ build job: 'Cassandra-devbranch-test-burn', parameters:
[string(name: 'REPO', value: params.REPO), string(name: 'BRANCH', value:
params.BRANCH)]
+ }
+ }
+ post {
+ success {
+ warnError('missing test xml files') {
+ copyArtifacts projectName:
'Cassandra-devbranch-test-burn', optional: true, target: 'test-burn',
fingerprintArtifacts: true, selector: lastSuccessful(stable: false)
+ }
+ }
+ unstable {
+ warnError('missing test xml files') {
+ copyArtifacts projectName:
'Cassandra-devbranch-test-burn', optional: true, target: 'test-burn',
fingerprintArtifacts: true, selector: lastSuccessful(stable: false)
+ }
+ }
+ }
+ }
+ stage('cdc') {
+ steps {
+ warnError('Tests unstable') {
+ build job: 'Cassandra-devbranch-test-cdc', parameters:
[string(name: 'REPO', value: params.REPO), string(name: 'BRANCH', value:
params.BRANCH)]
+ }
+ }
+ post {
+ success {
+ warnError('missing test xml files') {
+ copyArtifacts projectName:
'Cassandra-devbranch-test-cdc', optional: true, target: 'test-cdc',
fingerprintArtifacts: true, selector: lastSuccessful(stable: false)
+ }
+ }
+ unstable {
+ warnError('missing test xml files') {
+ copyArtifacts projectName:
'Cassandra-devbranch-test-cdc', optional: true, target: 'test-cdc',
fingerprintArtifacts: true, selector: lastSuccessful(stable: false)
+ }
+ }
+ }
+ }
+ stage('compression') {
+ steps {
+ warnError('Tests unstable') {
+ build job: 'Cassandra-devbranch-test-compression',
parameters: [string(name: 'REPO', value: params.REPO), string(name: 'BRANCH',
value: params.BRANCH)]
+ }
+ }
+ post {
+ success {
+ warnError('missing test xml files') {
+ copyArtifacts projectName:
'Cassandra-devbranch-test-compression', optional: true, target:
'test-compression', fingerprintArtifacts: true, selector:
lastSuccessful(stable: false)
+ }
+ }
+ unstable {
+ warnError('missing test xml files') {
+ copyArtifacts projectName:
'Cassandra-devbranch-test-compression', optional: true, target:
'test-compression', fingerprintArtifacts: true, selector:
lastSuccessful(stable: false)
+ }
+ }
+ }
+ }
+ stage('cqlsh') {
+ steps {
+ warnError('Tests unstable') {
+ build job: 'Cassandra-devbranch-cqlsh-tests', parameters:
[string(name: 'REPO', value: params.REPO), string(name: 'BRANCH', value:
params.BRANCH)]
+ }
+ }
+ post {
+ success {
+ warnError('missing test xml files') {
+ copyArtifacts projectName:
'Cassandra-devbranch-cqlsh-tests', optional: true, target: 'test-cqlsh',
fingerprintArtifacts: true, selector: lastSuccessful(stable: false)
+ }
+ }
+ unstable {
+ warnError('missing test xml files') {
+ copyArtifacts projectName:
'Cassandra-devbranch-cqlsh-tests', optional: true, target: 'test-cqlsh',
fingerprintArtifacts: true, selector: lastSuccessful(stable: false)
+ }
+ }
+ }
+ }
+ }
+ }
+ stage('Summary') {
+ steps {
+ junit '**/TEST*.xml,**/cqlshlib.xml,**/nosetests.xml'
+
+ slackSend channel: '#cassandra-builds', message:
"${currentBuild.fullDisplayName} completed: ${currentBuild.result}. See
${env.BUILD_URL}"
+
+ emailext to: '[email protected]', subject: "Build
complete: ${currentBuild.fullDisplayName} [${currentBuild.result}]", body:
'${CHANGES}<p>${JELLY_SCRIPT,template="text"}'
+ }
+ }
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]