-
Notifications
You must be signed in to change notification settings - Fork 1
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
DAOS-13527 test: Support default tag assignment through Jenkinsfile #377
Open
phender
wants to merge
1
commit into
master
Choose a base branch
from
pahender/DAOS-13527
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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 | ||
---|---|---|---|---|
|
@@ -274,34 +274,42 @@ Map call(Map config = [:]) { | |||
} | ||||
|
||||
// Determine which tests tags to use | ||||
String tag | ||||
if (startedByUser() || startedByUpstream()) { | ||||
// Test tags defined by the build parameters override all other tags | ||||
tag = get_build_params_tags() | ||||
} | ||||
if (!tag && startedByTimer()) { | ||||
// Stage defined tags take precedence in timed builds | ||||
tag = config['test_tag'] | ||||
if (!tag) { | ||||
// Otherwise use the default timed build tags | ||||
tag = 'pr daily_regression' | ||||
if (env.BRANCH_NAME.startsWith('weekly-testing')) { | ||||
tag = 'full_regression' | ||||
// config Build Param Commit Pragma | ||||
// Started by 'test_tag' (TestTag) (Test-tag) Default Use | ||||
// -------------- ---------- ---------- ------------- ---------- ---------- | ||||
// PR | Upstream None None None defaul_tag defaul_tag | ||||
// PR | Upstream None None commit_tag defaul_tag commit_tag | ||||
// PR | Upstream None param_tag None defaul_tag param_tag | ||||
// PR | Upstream None param_tag commit_tag defaul_tag commit_tag | ||||
// Manual | Timer None None <any> defaul_tag defaul_tag | ||||
// Manual | Timer None param_tag <any> defaul_tag param_tag | ||||
// <any> config_tag <any> <any> <any> config_tag | ||||
// | ||||
String tag = config['test_tag'] | ||||
if (!tag) { | ||||
if (startedByUser() || startedByTimer()) { | ||||
// Get tags from the build parameters | ||||
tag = get_build_params_tags() | ||||
if (!tag) { | ||||
// Default to the pr tag for any other build stage | ||||
tag = 'pr' | ||||
} | ||||
} | ||||
} else if (!tag) { | ||||
if (env.BRANCH_NAME.matches(testBranchRE())) { | ||||
tag = 'always_passes' | ||||
} else { | ||||
// Tags defined by commit pragmas have priority in user PRs | ||||
else { | ||||
// Get tags from the commit pragmas | ||||
tag = get_commit_pragma_tags(result['pragma_suffix']) | ||||
if (!tag) { | ||||
// Followed by stage defined tags | ||||
tag = config['test_tag'] | ||||
/* groovylint-disable-next-line CouldBeElvis */ | ||||
// Get tags from the build parameters | ||||
tag = get_build_params_tags() | ||||
if (!tag) { | ||||
// Otherwise use the default PR tag | ||||
tag = 'pr' | ||||
if (startedByUpstream()) { | ||||
// Default to run simple tests for dowstream builds | ||||
tag = 'always_passes' | ||||
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. Should this reflect
TBH, I'm on the fence about whether the default tags for downstream testing belong here or above. |
||||
} | ||||
else { | ||||
// Default to the pr tag for any other build stage | ||||
tag = 'pr' | ||||
} | ||||
} | ||||
} | ||||
} | ||||
|
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.
Is this the same problem as we discussed before, in that downstream test jobs' parameters are ignored if the branch being used for the downstream job has commit pragmas on it (ignoring for now the commit we add to override the commit pragmas)?