-
Notifications
You must be signed in to change notification settings - Fork 1
SRE-3441: Replace Valgrind with recordIssues #483
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
Open
JohnMalmberg
wants to merge
1
commit into
sre-3441
Choose a base branch
from
sre-3441b
base: sre-3441
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.
+71
−51
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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,37 +1,30 @@ | ||
| /* groovylint-disable DuplicateStringLiteral */ | ||
| // vars/buildDaosJob.groovy | ||
|
|
||
| /** | ||
| * buildDaosJob step method. | ||
| * | ||
| * The paramater names must match parameters that are the Jenkinsfile for | ||
| * The parameter names must match parameters that are the Jenkinsfile for | ||
| * DAOS master. | ||
| * | ||
| * | ||
| * @param config Map of parameters passed | ||
| */ | ||
|
|
||
| void call(String branch, String priority) { | ||
| setupDownstreamTesting('daos-stack/daos', branch, | ||
| List buildOptions = setupDownstreamTesting('daos-stack/daos', branch, | ||
| (cachedCommitPragma('Test-skip-build', 'false') == 'true' ? | ||
| 'Skip-build: true' : '') + | ||
| (cachedCommitPragma('Skip-downstream-test', 'false') == 'true' ? | ||
| '\nSkip-test: true' : '')) | ||
|
|
||
| build job: 'daos-stack/daos/' + setupDownstreamTesting.test_branch((branch)), | ||
| parameters: [string(name: 'TestTag', | ||
| List buildParameters = [string(name: 'TestTag', | ||
| value: cachedCommitPragma( | ||
| 'Test-tag', | ||
| 'load_mpi test_core_files ' + | ||
| 'test_pool_info_query')), | ||
| string(name: 'CI_RPM_TEST_VERSION', | ||
| value: cachedCommitPragma('Test-skip-build', 'false') == 'true' ? | ||
| daosLatestVersion(branch) : ''), | ||
| string(name: 'BuildPriority', value: priority), | ||
| booleanParam(name: 'CI_FI_el8_TEST', value: true), | ||
| booleanParam(name: 'CI_MORE_FUNCTIONAL_PR_TESTS', value: true), | ||
| booleanParam(name: 'CI_FUNCTIONAL_el9_TEST', value: true), | ||
| booleanParam(name: 'CI_FUNCTIONAL_el8_TEST', value: true), | ||
| booleanParam(name: 'CI_FUNCTIONAL_leap15_TEST', value: true), | ||
| booleanParam(name: 'CI_medium_TEST', value: false), | ||
| booleanParam(name: 'CI_large_TEST', value: false) | ||
| ] | ||
| string(name: 'BuildPriority', value: priority)] + buildOptions | ||
| build job: 'daos-stack/daos/' + setupDownstreamTesting.test_branch((branch)), | ||
| parameters: buildParameters | ||
| } |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,15 +1,20 @@ | ||
| /* groovylint-disable DuplicateStringLiteral, GStringExpressionWithinString */ | ||
| // vars/setupDownstreamTesting.groovy | ||
|
|
||
| String test_branch(String target) { | ||
| return 'ci-' + JOB_NAME.replaceAll('/', '-') + | ||
| '-' + target.replaceAll('/', '-') | ||
| } | ||
|
|
||
| List githubAccess() { | ||
| return [[$class: 'UsernamePasswordMultiBinding', | ||
| credentialsId: 'daos_jenkins_project_github_access', | ||
| usernameVariable: 'GH_USER', | ||
| passwordVariable: 'GH_PASS']] | ||
| } | ||
|
|
||
| void cleanup(String project, String branch) { | ||
| withCredentials([[$class: 'UsernamePasswordMultiBinding', | ||
| credentialsId: 'daos_jenkins_project_github_access', | ||
| usernameVariable: 'GH_USER', | ||
| passwordVariable: 'GH_PASS']]) { | ||
| withCredentials(githubAccess()) { | ||
| sh(label: 'Delete test branch', | ||
| script: 'if ! git push https://$GH_USER:[email protected]/' + project + | ||
| ' --delete ' + test_branch(branch) + '''; then | ||
|
|
@@ -25,18 +30,26 @@ void cleanup(String project, String branch) { | |
| /** | ||
| * setupDownstreamTesting.groovy | ||
| * | ||
| * Set up a branch to perform dowstream testing on | ||
| * Set up a branch to perform downstream testing on | ||
| */ | ||
|
|
||
| /* groovylint-disable-next-line NoDef, ParameterName */ | ||
| void call(String project, String branch, String commit_pragmas = '') { | ||
| /* groovylint-disable-next-line MethodSize, NoDef, ParameterName */ | ||
| List call(String project, String branch, String commit_pragmas = '') { | ||
| // TODO: find out what the / escape is. I've already tried both %2F and %252F | ||
| // https://issues.jenkins.io/browse/JENKINS-68857 | ||
| // Instead, we will create a branch specifically to test on | ||
| withCredentials([[$class: 'UsernamePasswordMultiBinding', | ||
| credentialsId: 'daos_jenkins_project_github_access', | ||
| usernameVariable: 'GH_USER', | ||
| passwordVariable: 'GH_PASS']]) { | ||
| List knownParameters = ['CI_FI_el8_TEST', | ||
| 'CI_MORE_FUNCTIONAL_PR_TESTS', | ||
| 'CI_FUNCTIONAL_el9_TEST', | ||
| 'CI_FUNCTIONAL_el8_TEST', | ||
| 'CI_FUNCTIONAL_leap15_TEST', | ||
| 'CI_medium_TEST', | ||
| 'CI_large_TEST' | ||
| ] | ||
|
|
||
| List result = [] | ||
| String checkoutDir = project.split('/')[1] + '-' + branch.replaceAll('/', '-') | ||
| withCredentials(githubAccess()) { | ||
| sh label: 'Create or update test branch', | ||
| /* groovylint-disable-next-line GStringExpressionWithinString */ | ||
| script: 'branch_name=' + test_branch(branch) + ''' | ||
|
|
@@ -47,7 +60,7 @@ void call(String project, String branch, String commit_pragmas = '') { | |
| branch) + ''' | ||
| # dir for checkout since all runs in the matrix share the same | ||
| # workspace | ||
| dir="''' + project.split('/')[1] + '-' + branch.replaceAll('/', '-') + '''" | ||
| dir="''' + checkoutDir + '''" | ||
| #rm -rf "$dir" | ||
| if cd $dir; then | ||
| git remote update | ||
|
|
@@ -100,8 +113,24 @@ void call(String project, String branch, String commit_pragmas = '') { | |
| git push -f origin $branch_name:$branch_name | ||
| sleep 10''' | ||
| } // withCredentials | ||
|
|
||
| // Set up parameters for downstream testing | ||
| // Check which known parameters exist in the Jenkinsfile | ||
| String jenkinsfilePath = checkoutDir + '/Jenkinsfile' | ||
| if (fileExists(jenkinsfilePath)) { | ||
| String jenkinsfileContent = readFile(jenkinsfilePath) | ||
| knownParameters.each { param -> | ||
| if (jenkinsfileContent.contains(param)) { | ||
| Boolean defaultValue = param in ['CI_medium_TEST', 'CI_large_TEST'] ? false : true | ||
| result.add(booleanParam(name: param, value: defaultValue)) | ||
| } | ||
| } | ||
| } else { | ||
| echo "Warning: Jenkinsfile not found at ${jenkinsfilePath}" | ||
| } | ||
|
|
||
| sh label: 'Delete local test branch', | ||
| script: '''dir="''' + project.split('/')[1] + '-' + branch.replaceAll('/', '-') + '''" | ||
| script: '''dir="''' + checkoutDir + '''" | ||
| if ! cd $dir; then | ||
| echo "$dir does not exist" | ||
| exit 1 | ||
|
|
@@ -112,4 +141,5 @@ void call(String project, String branch, String commit_pragmas = '') { | |
| git branch -a | ||
| exit 1 | ||
| fi''' | ||
| return result | ||
| } // call | ||
This file contains hidden or 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
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.
Does this commented out section need to be removed before landing?