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 5f1871c In Jenkins, add pipeline builds for each of the supported
branch, delegating to the in-tree Jenkinsfile (CASSANDRA-15496)
5f1871c is described below
commit 5f1871c016a8b1036702bf26c3f7bdf63846a8db
Author: mck <[email protected]>
AuthorDate: Fri Jan 17 10:35:10 2020 +0100
In Jenkins, add pipeline builds for each of the supported branch,
delegating to the in-tree Jenkinsfile (CASSANDRA-15496)
---
jenkins-dsl/cassandra_job_dsl_seed.groovy | 78 ++++++++++--
jenkins-dsl/cassandra_pipeline.groovy | 195 ------------------------------
2 files changed, 68 insertions(+), 205 deletions(-)
diff --git a/jenkins-dsl/cassandra_job_dsl_seed.groovy
b/jenkins-dsl/cassandra_job_dsl_seed.groovy
index 2911b1f..28c4eb4 100644
--- a/jenkins-dsl/cassandra_job_dsl_seed.groovy
+++ b/jenkins-dsl/cassandra_job_dsl_seed.groovy
@@ -4,7 +4,7 @@
//
////////////////////////////////////////////////////////////
-def jobDescription = 'Apache Cassandra DSL-generated job - DSL git repo: <a
href="https://gitbox.apache.org/repos/asf?p=cassandra-builds.git">cassandra-builds</a>'
+def jobDescription = '<img
src="http://cassandra.apache.org/img/cassandra_logo.png" /><br/>Apache
Cassandra DSL-generated job - DSL git repo: <a
href="https://gitbox.apache.org/repos/asf?p=cassandra-builds.git">cassandra-builds</a>'
def jdkLabel = 'JDK 1.8 (latest)'
if(binding.hasVariable("CASSANDRA_JDK_LABEL")) {
jdkLabel = "${CASSANDRA_JDK_LABEL}"
@@ -169,7 +169,7 @@ job('Cassandra-template-test') {
}
publishers {
archiveArtifacts {
- pattern('build/test/**/TEST-*.xml')
+
pattern('build/test/**/TEST-*.xml,build/**/eclipse_compiler_checks.txt')
allowEmpty()
fingerprint()
}
@@ -414,6 +414,44 @@ cassandraBranches.each {
}
}
}
+
+ /**
+ * Branch Pipelines
+ */
+ pipelineJob("${jobNamePrefix}") {
+ description(jobDescription)
+ logRotator {
+ numToKeep(50)
+ artifactNumToKeep(1)
+ }
+ wrappers {
+ timeout {
+ noActivity(1200)
+ }
+ }
+ throttleConcurrentBuilds {
+ categories(['Cassandra'])
+ }
+ definition {
+ cpsScm {
+ scm {
+ git {
+ remote {
+ url(mainRepo)
+ }
+ branch("${branchName}")
+ extensions {
+ cleanAfterCheckout()
+ }
+ }
+ }
+ scriptPath('.jenkins/Jenkinsfile')
+ }
+ }
+ triggers {
+ scm('H/30 * * * *')
+ }
+ }
}
////////////////////////////////////////////////////////////
@@ -466,11 +504,11 @@ testTargets.each {
shell("./cassandra-builds/build-scripts/cassandra-unittest.sh
${targetName}")
}
publishers {
- archiveArtifacts {
- pattern('build/test/**/TEST-*.xml')
- allowEmpty()
- fingerprint()
- }
+ archiveArtifacts {
+
pattern('build/test/**/TEST-*.xml,build/**/eclipse_compiler_checks.txt')
+ allowEmpty()
+ fingerprint()
+ }
archiveJunit('build/test/**/TEST-*.xml') {
testDataPublishers {
publishTestStabilityData()
@@ -619,16 +657,36 @@ pipelineJob('Cassandra-devbranch') {
numToKeep(50)
artifactNumToKeep(1)
}
+ wrappers {
+ timeout {
+ noActivity(1200)
+ }
+ }
+ throttleConcurrentBuilds {
+ categories(['Cassandra'])
+ }
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')
+ stringParam('DOCKER_IMAGE', "${dtestDockerImage}", 'Docker image for
running dtests')
}
definition {
- cps {
- script(readFileFromWorkspace('Cassandra-Job-DSL',
'jenkins-dsl/cassandra_pipeline.groovy'))
- sandbox()
+ cpsScm {
+ scm {
+ git {
+ remote {
+ url('https://github.com/${REPO}/cassandra.git')
+ }
+ branch('${BRANCH}')
+ extensions {
+ cleanAfterCheckout()
+ }
+ }
+ }
+ lightweight()
+ scriptPath('.jenkins/Jenkinsfile')
}
}
}
diff --git a/jenkins-dsl/cassandra_pipeline.groovy
b/jenkins-dsl/cassandra_pipeline.groovy
deleted file mode 100644
index d0ac4a2..0000000
--- a/jenkins-dsl/cassandra_pipeline.groovy
+++ /dev/null
@@ -1,195 +0,0 @@
-
-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]