You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by mc...@apache.org on 2020/01/27 17:55:45 UTC
[cassandra-builds] branch master updated: Patch pipeline builds
still need the separate declarative pipeline,
to pass through the parameters to the build jobs.
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 defad88 Patch pipeline builds still need the separate declarative pipeline, to pass through the parameters to the build jobs.
defad88 is described below
commit defad885926ba4674deec8b7ef0a839ded42e396
Author: mck <mc...@apache.org>
AuthorDate: Sun Jan 26 12:31:35 2020 +0100
Patch pipeline builds still need the separate declarative pipeline, to pass through the parameters to the build jobs.
---
jenkins-dsl/cassandra_job_dsl_seed.groovy | 58 +++++--
jenkins-dsl/cassandra_pipeline.groovy | 246 ++++++++++++++++++++++++++++++
2 files changed, 290 insertions(+), 14 deletions(-)
diff --git a/jenkins-dsl/cassandra_job_dsl_seed.groovy b/jenkins-dsl/cassandra_job_dsl_seed.groovy
index c764e46..c876ebf 100644
--- a/jenkins-dsl/cassandra_job_dsl_seed.groovy
+++ b/jenkins-dsl/cassandra_job_dsl_seed.groovy
@@ -424,6 +424,46 @@ cassandraBranches.each {
////////////////////////////////////////////////////////////
/**
+ * Parameterized Artifacts
+ */
+job('Cassandra-devbranch-artifacts') {
+ description(jobDescription)
+ jdk(jdkLabel)
+ label(slaveLabel)
+ logRotator {
+ numToKeep(25)
+ artifactNumToKeep(1)
+ }
+ wrappers {
+ timeout {
+ noActivity(300)
+ }
+ }
+ 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')
+ }
+ scm {
+ git {
+ remote {
+ url('https://github.com/${REPO}/cassandra.git')
+ }
+ branch('${BRANCH}')
+ extensions {
+ cleanAfterCheckout()
+ }
+ }
+ }
+ steps {
+ buildDescription('', buildDescStr)
+ shell("git clean -xdff ; git clone -b ${buildsBranch} ${buildsRepo}")
+ }
+}
+
+/**
* Parameterized Dev Branch `ant test`
*/
testTargets.each {
@@ -628,20 +668,10 @@ pipelineJob('Cassandra-devbranch') {
stringParam('DOCKER_IMAGE', "${dtestDockerImage}", 'Docker image for running dtests')
}
definition {
- cpsScm {
- scm {
- git {
- remote {
- url('https://github.com/${REPO}/cassandra.git')
- }
- branch('${BRANCH}')
- extensions {
- cleanAfterCheckout()
- }
- }
- }
- lightweight()
- scriptPath('.jenkins/Jenkinsfile')
+ cps {
+ // Cassandra-devbranch still needs custom Jenkinsfile because of the parameters passed into the build jobs.
+ 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..0f37131
--- /dev/null
+++ b/jenkins-dsl/cassandra_pipeline.groovy
@@ -0,0 +1,246 @@
+// Cassandra-devbranch needs custom Jenkinsfile because of the parameters passed into the build jobs.
+pipeline {
+ agent any
+ stages {
+ stage('Init') {
+ steps {
+ cleanWs()
+ }
+ }
+ stage('Build') {
+ steps {
+ build job: "${env.JOB_NAME}-artifacts", parameters: [string(name: 'REPO', value: params.REPO), string(name: 'BRANCH', value: params.BRANCH)]
+ }
+ }
+ stage('Test') {
+ parallel {
+ stage('stress') {
+ steps {
+ warnError('Tests unstable') {
+ build job: "${env.JOB_NAME}-stress-test", parameters: [string(name: 'REPO', value: params.REPO), string(name: 'BRANCH', value: params.BRANCH)]
+ }
+ }
+ post {
+ success {
+ warnError('missing test xml files') {
+ script {
+ copyTestResults('stress-test')
+ }
+ }
+ }
+ unstable {
+ warnError('missing test xml files') {
+ script {
+ copyTestResults('stress-test')
+ }
+ }
+ }
+ }
+ }
+ stage('JVM DTests') {
+ steps {
+ warnError('Tests unstable') {
+ build job: "${env.JOB_NAME}-test-jvm-dtest-forking", parameters: [string(name: 'REPO', value: params.REPO), string(name: 'BRANCH', value: params.BRANCH)]
+ }
+ }
+ post {
+ success {
+ warnError('missing test xml files') {
+ script {
+ copyTestResults('test-jvm-dtest-forking')
+ }
+ }
+ }
+ unstable {
+ warnError('missing test xml files') {
+ script {
+ copyTestResults('test-jvm-dtest-forking')
+ }
+ }
+ }
+ }
+ }
+ stage('units') {
+ steps {
+ warnError('Tests unstable') {
+ build job: "${env.JOB_NAME}-test", parameters: [string(name: 'REPO', value: params.REPO), string(name: 'BRANCH', value: params.BRANCH)]
+ }
+ }
+ post {
+ success {
+ warnError('missing test xml files') {
+ script {
+ copyTestResults('test')
+ }
+ }
+ }
+ unstable {
+ warnError('missing test xml files') {
+ script {
+ copyTestResults('test')
+ }
+ }
+ }
+ }
+ }
+ stage('long units') {
+ steps {
+ warnError('Tests unstable') {
+ build job: "${env.JOB_NAME}-long-test", parameters: [string(name: 'REPO', value: params.REPO), string(name: 'BRANCH', value: params.BRANCH)]
+ }
+ }
+ post {
+ success {
+ warnError('missing test xml files') {
+ script {
+ copyTestResults('long-test')
+ }
+ }
+ }
+ unstable {
+ warnError('missing test xml files') {
+ script {
+ copyTestResults('long-test')
+ }
+ }
+ }
+ }
+ }
+ stage('burn') {
+ steps {
+ warnError('Tests unstable') {
+ build job: "${env.JOB_NAME}-test-burn", parameters: [string(name: 'REPO', value: params.REPO), string(name: 'BRANCH', value: params.BRANCH)]
+ }
+ }
+ post {
+ success {
+ warnError('missing test xml files') {
+ script {
+ copyTestResults('test-burn')
+ }
+ }
+ }
+ unstable {
+ warnError('missing test xml files') {
+ script {
+ copyTestResults('test-burn')
+ }
+ }
+ }
+ }
+ }
+ stage('cdc') {
+ steps {
+ warnError('Tests unstable') {
+ build job: "${env.JOB_NAME}-test-cdc", parameters: [string(name: 'REPO', value: params.REPO), string(name: 'BRANCH', value: params.BRANCH)]
+ }
+ }
+ post {
+ success {
+ warnError('missing test xml files') {
+ script {
+ copyTestResults('test-cdc')
+ }
+ }
+ }
+ unstable {
+ warnError('missing test xml files') {
+ script {
+ copyTestResults('test-cdc')
+ }
+ }
+ }
+ }
+ }
+ stage('compression') {
+ steps {
+ warnError('Tests unstable') {
+ build job: "${env.JOB_NAME}-test-compression", parameters: [string(name: 'REPO', value: params.REPO), string(name: 'BRANCH', value: params.BRANCH)]
+ }
+ }
+ post {
+ success {
+ warnError('missing test xml files') {
+ script {
+ copyTestResults('test-compression')
+ }
+ }
+ }
+ unstable {
+ warnError('missing test xml files') {
+ script {
+ copyTestResults('test-compression')
+ }
+ }
+ }
+ }
+ }
+ stage('cqlsh') {
+ steps {
+ warnError('Tests unstable') {
+ build job: "${env.JOB_NAME}-cqlsh-tests", parameters: [string(name: 'REPO', value: params.REPO), string(name: 'BRANCH', value: params.BRANCH), string(name: 'DTEST_REPO', value: params.DTEST_REPO), string(name: 'DTEST_BRANCH', value: params.DTEST_BRANCH)]
+ }
+ }
+ post {
+ success {
+ warnError('missing test xml files') {
+ script {
+ copyTestResults('cqlsh-test')
+ }
+ }
+ }
+ unstable {
+ warnError('missing test xml files') {
+ script {
+ copyTestResults('cqlsh-test')
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ stage('Distributed Test') {
+ parallel {
+ stage('dtest') {
+ steps {
+ warnError('Tests unstable') {
+ build job: "${env.JOB_NAME}-dtest", parameters: [string(name: 'REPO', value: params.REPO), string(name: 'BRANCH', value: params.BRANCH), string(name: 'DTEST_REPO', value: params.DTEST_REPO), string(name: 'DTEST_BRANCH', value: params.DTEST_BRANCH), string(name: 'DOCKER_IMAGE', value: params.DOCKER_IMAGE)]
+ }
+ }
+ post {
+ success {
+ warnError('missing test xml files') {
+ script {
+ copyTestResults('dtest')
+ }
+ }
+ }
+ unstable {
+ warnError('missing test xml files') {
+ script {
+ copyTestResults('dtest')
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ stage('Summary') {
+ steps {
+ junit '**/TEST*.xml,**/cqlshlib.xml,**/nosetests.xml'
+ }
+ }
+ }
+}
+
+def copyTestResults(target) {
+ step([$class: 'CopyArtifact',
+ projectName: "${env.JOB_NAME}-${target}",
+ optional: true,
+ fingerprintArtifacts: true,
+ selector: [$class: 'StatusBuildSelector', stable: false],
+ target: target]);
+}
+
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org