|
29 | 29 | // |
30 | 30 | // This Jenkinsfile is expected to work on any Jenkins infrastructure. |
31 | 31 | // The controller should have 4 cpu, 12GB ram (and be configured to use `-XX:+UseG1GC -Xmx8G`) |
32 | | -// It is required to have agents providing five labels, each that can provide docker and the following capabilities: |
33 | | -// - cassandra-amd64-small : 1 cpu, 1GB ram |
34 | | -// - cassandra-small : 1 cpu, 1GB ram (alias for above but for any arch) |
35 | | -// - cassandra-amd64-medium : 3 cpu, 5GB ram |
36 | | -// - cassandra-medium : 3 cpu, 5GB ram (alias for above but for any arch) |
37 | | -// - cassandra-amd64-large : 7 cpu, 16GB ram |
38 | | -// - cassandra-large : 7 cpu, 16GB ram |
| 32 | +// |
| 33 | +// It is required to have agents providing 6+ labels, each that can provide docker and the following capabilities: |
| 34 | +// |
| 35 | +// - cassandra-small + cassandra-${arch}-small : 1 cpu, 1GB ram (alias for above but for any arch) |
| 36 | +// - cassandra-medium + cassandra-${arch}-medium : 3 cpu, 5GB ram |
| 37 | +// - cassandra-large + cassandra-${arch}-large : 7 cpu, 16GB ram |
| 38 | +// |
| 39 | +// Performance targets required a `cassandra-${arch}-large-dedicated` labelled nodes. |
| 40 | +// |
| 41 | +// Nodes running on spot instances have to have labels with `-spot` suffixes. |
| 42 | +// For example: cassandra-amd64-large-spot |
39 | 43 | // |
40 | 44 | // When running builds parameterised to other architectures the corresponding labels are expected. |
41 | 45 | // For example 'arm64' requires the labels: cassandra-arm64-small, cassandra-arm64-medium, cassandra-arm64-large. |
42 | 46 | // |
43 | | -// The built-in node must has the "controller" label. There must be more than two agents for each label. |
44 | | -// |
45 | 47 | // Plugins required are: |
46 | | -// git, workflow-job, workflow-cps, junit, workflow-aggregator, ws-cleanup, pipeline-build-step, test-stability, copyartifact. |
| 48 | +// git, workflow-job, workflow-cps, junit, workflow-aggregator, ws-cleanup, pipeline-build-step, test-stability, copyartifact, jmh-report. |
| 49 | +// See .jenkins/k8s/jenkins-deployment.yaml for up to date list of plugins. |
47 | 50 | // |
48 | 51 | // Any functionality that depends upon ASF Infra ( i.e. the canonical ci-cassandra.a.o ) |
49 | 52 | // will be ignored when run on other environments. |
@@ -143,6 +146,7 @@ def pipelineProfiles() { |
143 | 146 | 'pre-commit': ['artifacts', 'lint', 'debian', 'redhat', 'fqltool-test', 'cqlsh-test', 'test', 'test-latest', 'stress-test', 'test-burn', 'jvm-dtest', 'simulator-dtest', 'dtest', 'dtest-latest'], |
144 | 147 | 'pre-commit w/ upgrades': ['artifacts', 'lint', 'debian', 'redhat', 'fqltool-test', 'cqlsh-test', 'test', 'test-latest', 'stress-test', 'test-burn', 'jvm-dtest', 'jvm-dtest-upgrade', 'simulator-dtest', 'dtest', 'dtest-novnode', 'dtest-latest', 'dtest-upgrade'], |
145 | 148 | 'post-commit': ['artifacts', 'lint', 'debian', 'redhat', 'fqltool-test', 'cqlsh-test', 'test-cdc', 'test', 'test-latest', 'test-compression', 'stress-test', 'test-burn', 'long-test', 'test-oa', 'test-system-keyspace-directory', 'jvm-dtest', 'jvm-dtest-upgrade', 'simulator-dtest', 'dtest', 'dtest-novnode', 'dtest-latest', 'dtest-large', 'dtest-large-novnode', 'dtest-large-latest', 'dtest-upgrade', 'dtest-upgrade-novnode', 'dtest-upgrade-large', 'dtest-upgrade-novnode-large'], |
| 149 | + 'performance': ['microbench'], |
146 | 150 | 'custom': [] |
147 | 151 | ] |
148 | 152 | } |
@@ -204,12 +208,19 @@ def tasks() { |
204 | 208 | 'dtest-upgrade-novnode': [splits: 128, size: 'large'], |
205 | 209 | 'dtest-upgrade-large': [splits: 32, size: 'large'], |
206 | 210 | 'dtest-upgrade-novnode-large': [splits: 32, size: 'large'], |
| 211 | + 'test-system-keyspace-directory': [splits: 16], |
| 212 | + // performance tests need 'cassandra-*large-dedicated' nodes |
| 213 | + 'microbench': [splits: 1, size: 'large', timeout: 6, benchmark: true], |
207 | 214 | ] |
208 | 215 | testSteps.each() { |
209 | 216 | it.value.put('type', 'test') |
210 | 217 | if (!it.value['size']) { |
211 | 218 | it.value.put('size', 'medium') |
212 | 219 | } |
| 220 | + if (!it.value['timeout']) { |
| 221 | + // default 1 hour |
| 222 | + it.value.put('timeout', 1) |
| 223 | + } |
213 | 224 | if (it.key.startsWith('dtest')) { |
214 | 225 | it.value.put('python-dtest', true) |
215 | 226 | } |
@@ -391,7 +402,7 @@ def test(command, cell) { |
391 | 402 | script_vars = "${script_vars} cython=\'${cell.cython}\'" |
392 | 403 | } |
393 | 404 | script_vars = fetchDTestsSource(command, script_vars) |
394 | | - timeout(time: 1, unit: 'HOURS') { // best throughput with each cell at ~10 minutes |
| 405 | + timeout(time: command.timeout, unit: 'HOURS') { // best throughput with each cell at ~10 minutes |
395 | 406 | def timer = System.currentTimeMillis() |
396 | 407 | try { |
397 | 408 | buildJVMDTestJars(cell, script_vars, logfile) |
@@ -425,7 +436,7 @@ def test(command, cell) { |
425 | 436 | find test/output -type f -name "*.xml" -print0 | xargs -0 -r -n1 -P"\$(nproc)" xz -f |
426 | 437 | echo "test result files compressed"; find test/output -type f -name "*.xml.xz" | wc -l |
427 | 438 | """ |
428 | | - archiveArtifacts artifacts: "test/logs/**,test/**/TEST-*.xml.xz,test/**/cqlshlib*.xml.xz,test/**/nosetests*.xml.xz", fingerprint: true |
| 439 | + archiveArtifacts artifacts: "test/logs/**,test/**/TEST-*.xml.xz,test/**/cqlshlib*.xml.xz,test/**/nosetests*.xml.xz,test/jmh-result.json", fingerprint: true |
429 | 440 | copyToNightlies("${logfile}, test/logs/**", "${cell.step}/${cell.arch}/jdk${cell.jdk}/python${cell.python}/cython_${cell.cython}/" + "split_${cell.split}_${splits}".replace("/", "_")) |
430 | 441 | } |
431 | 442 | cleanAgent(cell.step) |
@@ -483,8 +494,12 @@ def fetchDockerImages(dockerfiles) { |
483 | 494 | } |
484 | 495 |
|
485 | 496 | def getNodeLabel(command, cell) { |
486 | | - echo "using node label: cassandra-${cell.arch}-${command.size}" |
487 | | - return "cassandra-${cell.arch}-${command.size}" |
| 497 | + def label = "cassandra-${cell.arch}-${command.size}" |
| 498 | + if (command.containsKey('benchmark') && command.benchmark) { |
| 499 | + label = "${label}-dedicated" |
| 500 | + } |
| 501 | + echo "using node label: ${label}" |
| 502 | + return label |
488 | 503 | } |
489 | 504 |
|
490 | 505 | def copyToNightlies(sourceFiles, remoteDirectory='') { |
@@ -557,7 +572,7 @@ def generateTestReports() { |
557 | 572 | unzip -x -d build/test -q output.zip ) ${teeSuffix} |
558 | 573 | """ |
559 | 574 | } else { |
560 | | - copyArtifacts filter: 'test/**/TEST-*.xml.xz,test/**/cqlshlib*.xml.xz,test/**/nosetests*.xml.xz', fingerprintArtifacts: true, projectName: env.JOB_NAME, selector: specific(env.BUILD_NUMBER), target: "build/", optional: true |
| 575 | + copyArtifacts filter: 'test/**/TEST-*.xml.xz,test/**/cqlshlib*.xml.xz,test/**/nosetests*.xml.xz,test/jmh-result.json', fingerprintArtifacts: true, projectName: env.JOB_NAME, selector: specific(env.BUILD_NUMBER), target: "build/", optional: true |
561 | 576 | } |
562 | 577 | if (fileExists('build/test/output')) { |
563 | 578 | // merge splits for each target's test report, other axes are kept separate |
@@ -585,7 +600,10 @@ def generateTestReports() { |
585 | 600 |
|
586 | 601 | dir('build/') { |
587 | 602 | archiveArtifacts artifacts: "ci_summary.html,results_details.tar.xz,${logfile}", fingerprint: true |
588 | | - copyToNightlies('ci_summary.html,results_details.tar.xz,${logfile}') |
| 603 | + copyToNightlies('ci_summary.html,results_details.tar.xz,${logfile},test/jmh-result.json') |
| 604 | + if (fileExists('test/jmh-result.json')) { |
| 605 | + jmhReport('test/jmh-result.json') |
| 606 | + } |
589 | 607 | } |
590 | 608 | } |
591 | 609 | } |
|
0 commit comments