-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip PCT by default on PRs #2034
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
57817f6
Skip PCT by default on PRs
jglick 52817f7
Run full tests weekly
jglick 809cd9a
Empty commit should suffice
jglick 5fee7da
`git branch -D` might be necessary
jglick f639628
Copying DB automerge workflow from #2031
jglick ca28da0
Revert #2032 for `prep` phase, retaining node pool for PCT https://gi…
jglick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,6 @@ def parsePlugins(plugins) { | |
|
||
def pluginsByRepository | ||
def lines | ||
def fullTest = env.CHANGE_ID && pullRequest.labels.contains('full-test') | ||
|
||
stage('prep') { | ||
mavenEnv(jdk: 11) { | ||
|
@@ -61,10 +60,6 @@ stage('prep') { | |
pluginsByRepository = parsePlugins(plugins) | ||
|
||
lines = readFile('lines.txt').split('\n') | ||
if (env.CHANGE_ID && !fullTest) { | ||
// run PCT only on newest and oldest lines, to save resources (but check all lines on deliberate master builds) | ||
lines = [lines[0], lines[-1]] | ||
} | ||
launchable.install() | ||
withCredentials([string(credentialsId: 'launchable-jenkins-bom', variable: 'LAUNCHABLE_TOKEN')]) { | ||
lines.each { line -> | ||
|
@@ -85,35 +80,37 @@ stage('prep') { | |
} | ||
} | ||
|
||
branches = [failFast: !fullTest] | ||
lines.each {line -> | ||
pluginsByRepository.each { repository, plugins -> | ||
branches["pct-$repository-$line"] = { | ||
def jdk = line == 'weekly' ? 17 : 11 | ||
mavenEnv(jdk: jdk) { | ||
unstash line | ||
withEnv([ | ||
"PLUGINS=${plugins.join(',')}", | ||
"LINE=$line", | ||
'EXTRA_MAVEN_PROPERTIES=maven.test.failure.ignore=true:surefire.rerunFailingTestsCount=1' | ||
]) { | ||
sh ''' | ||
mvn -v | ||
bash pct.sh | ||
''' | ||
} | ||
launchable.install() | ||
withCredentials([string(credentialsId: 'launchable-jenkins-bom', variable: 'LAUNCHABLE_TOKEN')]) { | ||
launchable('verify') | ||
def sessionFile = "launchable-session-${line}.txt" | ||
unstash sessionFile | ||
def session = readFile(sessionFile).trim() | ||
launchable("record tests --session ${session} --group ${repository} maven './**/target/surefire-reports' './**/target/failsafe-reports'") | ||
if (BRANCH_NAME == 'master' || env.CHANGE_ID && pullRequest.labels.contains('full-test')) { | ||
branches = [failFast: false] | ||
lines.each {line -> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hide whitespace to see real change |
||
pluginsByRepository.each { repository, plugins -> | ||
branches["pct-$repository-$line"] = { | ||
def jdk = line == 'weekly' ? 17 : 11 | ||
mavenEnv(jdk: jdk) { | ||
unstash line | ||
withEnv([ | ||
"PLUGINS=${plugins.join(',')}", | ||
"LINE=$line", | ||
'EXTRA_MAVEN_PROPERTIES=maven.test.failure.ignore=true:surefire.rerunFailingTestsCount=1' | ||
]) { | ||
sh ''' | ||
mvn -v | ||
bash pct.sh | ||
''' | ||
} | ||
launchable.install() | ||
withCredentials([string(credentialsId: 'launchable-jenkins-bom', variable: 'LAUNCHABLE_TOKEN')]) { | ||
launchable('verify') | ||
def sessionFile = "launchable-session-${line}.txt" | ||
unstash sessionFile | ||
def session = readFile(sessionFile).trim() | ||
launchable("record tests --session ${session} --group ${repository} maven './**/target/surefire-reports' './**/target/failsafe-reports'") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
parallel branches | ||
} | ||
parallel branches | ||
|
||
infra.maybePublishIncrementals() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,3 +43,4 @@ actions: | |
spec: | ||
labels: | ||
- dependencies | ||
- full-test | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we are updating PCT, presumably we want to run it! |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
equivalently,