Skip to content

Commit

Permalink
Allow weekly release to be tested in isolation (jenkinsci#2644)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Nov 9, 2023
1 parent 825c8ab commit e99095c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def parsePlugins(plugins) {
def pluginsByRepository
def lines
def fullTestMarkerFile
def weeklyTestMarkerFile

stage('prep') {
mavenEnv(jdk: 21) {
Expand All @@ -58,6 +59,7 @@ stage('prep') {
}
}
fullTestMarkerFile = fileExists 'full-test'
weeklyTestMarkerFile = fileExists 'weekly-test'
dir('target') {
def plugins = readFile('plugins.txt').split('\n')
pluginsByRepository = parsePlugins(plugins)
Expand All @@ -81,9 +83,12 @@ stage('prep') {
}
}

if (BRANCH_NAME == 'master' || fullTestMarkerFile || env.CHANGE_ID && pullRequest.labels.contains('full-test')) {
if (BRANCH_NAME == 'master' || fullTestMarkerFile || weeklyTestMarkerFile || env.CHANGE_ID && (pullRequest.labels.contains('full-test') || pullRequest.labels.contains('weekly-test'))) {
branches = [failFast: false]
lines.each {line ->
if (line != 'weekly' && (weeklyTestMarkerFile || env.CHANGE_ID && pullRequest.labels.contains('weekly-test'))) {
return
}
pluginsByRepository.each { repository, plugins ->
branches["pct-$repository-$line"] = {
def jdk = line == 'weekly' ? 21 : 11
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ git commit -m 'Run full tests'

while keeping the PR in draft until tests pass and this file can be deleted.

Similarly, the `weekly-test` label (or marker file) can be used to run tests on weekly releases in isolation.

To further minimize build time, tests are run only on Linux, against Java 11, and without Docker support.
It is unusual but possible for cross-component incompatibilities to only be visible in more specialized environments (such as Windows).

Expand Down

0 comments on commit e99095c

Please sign in to comment.