Skip to content

Commit

Permalink
Jenkinsfile cleanup (datastax#1163)
Browse files Browse the repository at this point in the history
  • Loading branch information
absurdfarce authored and dkropachev committed Aug 9, 2024
1 parent 354a088 commit 59df663
Showing 1 changed file with 10 additions and 21 deletions.
31 changes: 10 additions & 21 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ Test Profiles:
Matrix Types:
Full: All server versions, python runtimes tested with and without Cython.
Develop: Smaller matrix for dev purpose.
Cassandra: All cassandra server versions.
Dse: All dse server versions.
Smoke: CI-friendly configurations. Currently-supported Python version + modern Cassandra/DSE instances.
We also avoid cython since it's tested as part of the nightlies
Parameters:
Expand All @@ -29,25 +30,16 @@ import com.datastax.jenkins.drivers.python.Slack

slack = new Slack()

// Define our predefined matrices
//
// Smoke tests are CI-friendly test configuration. Currently-supported Python version + modern C*/DSE instances.
// We also avoid cython since it's tested as part of the nightlies.
DEFAULT_CASSANDRA = ['2.1', '2.2', '3.0', '3.11', '4.0']
DEFAULT_DSE = ['dse-5.0.15', 'dse-5.1.35', 'dse-6.0.18', 'dse-6.7.17', 'dse-6.8.30']
DEFAULT_RUNTIME = ['2.7.18', '3.5.9', '3.6.10', '3.7.7', '3.8.3']
DEFAULT_RUNTIME = ['3.7.7', '3.8.3']
DEFAULT_CYTHON = ["True", "False"]
matrices = [
"FULL": [
"SERVER": DEFAULT_CASSANDRA + DEFAULT_DSE,
"RUNTIME": DEFAULT_RUNTIME,
"CYTHON": DEFAULT_CYTHON
],
"DEVELOP": [
"SERVER": ['2.1', '3.11', 'dse-6.8.30'],
"RUNTIME": ['2.7.18', '3.6.10'],
"CYTHON": DEFAULT_CYTHON
],
"CASSANDRA": [
"SERVER": DEFAULT_CASSANDRA,
"RUNTIME": DEFAULT_RUNTIME,
Expand Down Expand Up @@ -394,8 +386,9 @@ def describeBuild(buildContext) {
}
}

def scheduleTriggerJobName() {
"drivers/python/oss/master/disabled"
// branch pattern for cron
def branchPatternCron() {
~"(master)"
}

pipeline {
Expand Down Expand Up @@ -460,7 +453,7 @@ pipeline {
</table>''')
choice(
name: 'MATRIX',
choices: ['DEFAULT', 'SMOKE', 'FULL', 'DEVELOP', 'CASSANDRA', 'DSE'],
choices: ['DEFAULT', 'SMOKE', 'FULL', 'CASSANDRA', 'DSE'],
description: '''<p>The matrix for the build.</p>
<table style="width:100%">
<col width="25%">
Expand All @@ -481,10 +474,6 @@ pipeline {
<td><strong>FULL</strong></td>
<td>All server versions, python runtimes tested with and without Cython.</td>
</tr>
<tr>
<td><strong>DEVELOP</strong></td>
<td>Smaller matrix for dev purpose.</td>
</tr>
<tr>
<td><strong>CASSANDRA</strong></td>
<td>All cassandra server versions.</td>
Expand Down Expand Up @@ -629,10 +618,10 @@ pipeline {
}

triggers {
parameterizedCron((scheduleTriggerJobName() == env.JOB_NAME) ? """
parameterizedCron(branchPatternCron().matcher(env.BRANCH_NAME).matches() ? """
# Every weeknight (Monday - Friday) around 4:00 AM
# These schedules will run with and without Cython enabled for Python v2.7.18 and v3.5.9
H 4 * * 1-5 %CI_SCHEDULE=WEEKNIGHTS;EVENT_LOOP=LIBEV;CI_SCHEDULE_PYTHON_VERSION=2.7.18 3.5.9;CI_SCHEDULE_SERVER_VERSION=2.2 3.11 dse-5.1.35 dse-6.0.18 dse-6.7.17
# These schedules will run with and without Cython enabled for Python 3.7.7 and 3.8.3
H 4 * * 1-5 %CI_SCHEDULE=WEEKNIGHTS;EVENT_LOOP=LIBEV;CI_SCHEDULE_PYTHON_VERSION=3.7.7 3.8.3;CI_SCHEDULE_SERVER_VERSION=2.2 3.11 dse-5.1.35 dse-6.0.18 dse-6.7.17
""" : "")
}

Expand Down

0 comments on commit 59df663

Please sign in to comment.