-
Notifications
You must be signed in to change notification settings - Fork 282
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
Adding support to run integration tests in Jenkins #423
Merged
saratvemulapalli
merged 13 commits into
opensearch-project:main
from
saratvemulapalli:main
Sep 15, 2021
Merged
Changes from 10 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
bf8dd92
Adding Jenkins Job support for Integtests.
saratvemulapalli e0b731f
Removing S3 bucket parameter as its available via ENV.
saratvemulapalli ae2e635
Adding Readme to jenkins workflow
saratvemulapalli e366c42
Merge branch 'opensearch-project:main' into main
saratvemulapalli 2ccb076
Addressing comments and restructuring the job based on new changes in…
saratvemulapalli b827676
Addressing comments
saratvemulapalli 82ce7ef
Cleaing up
saratvemulapalli f09cc58
file
saratvemulapalli da720a2
Fixing merge conflicts
saratvemulapalli 50ff5c6
Updating the runner to new test.sh
saratvemulapalli 14cb452
Updating the test runner args
saratvemulapalli 2fcaa3c
Addressing minor comments
saratvemulapalli 9d07b97
Addressing minor comments
saratvemulapalli 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
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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
pipeline { | ||
agent none | ||
tools { | ||
jdk "JDK14" | ||
maven "maven-3.8.2" | ||
} | ||
stages { | ||
stage('Parameters') { | ||
steps { | ||
script { | ||
properties([ | ||
parameters([ | ||
string( | ||
defaultValue: '', | ||
name: 's3_bucket', | ||
trim: true | ||
saratvemulapalli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
), | ||
string( | ||
defaultValue: '', | ||
name: 'opensearch_version', | ||
trim: true | ||
), | ||
string( | ||
defaultValue: '', | ||
name: 'build_id', | ||
trim: true | ||
), | ||
string( | ||
defaultValue: '', | ||
name: 'test_run_id', | ||
trim: true | ||
), | ||
string( | ||
defaultValue: '', | ||
name: 'architecture', | ||
trim: true | ||
), | ||
]) | ||
]) | ||
} | ||
} | ||
} | ||
stage('Choose Agent Node') { | ||
steps { | ||
script { | ||
if ("${architecture}" == 'x64') { | ||
agentLabel = "Jenkins-Agent-al2-x64-m5xlarge" | ||
} else if ("${architecture}" == 'arm64') { | ||
agentLabel = "Jenkins-Agent-al2-arm64-m6gxlarge" | ||
} else { | ||
error("Unknown CPU architecture is provided") | ||
} | ||
} | ||
} | ||
} | ||
stage('Run Integration Tests') { | ||
agent { | ||
node { | ||
label "${agentLabel}" | ||
} | ||
} | ||
steps { | ||
sh "./bundle-workflow/test.sh --s3-bucket ${s3_bucket} --opensearch-version ${opensearch_version} --build-id ${build_id} --architecture ${architecture} --test-run-id ${test_run_id}" | ||
saratvemulapalli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
post() { | ||
always { | ||
cleanWs disableDeferredWipeout: true, deleteDirs: true | ||
} | ||
} | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
- [Integration Tests Jenkins Job](#integration-tests-jenkins-job) | ||
- [Job Parameters](#job-parameters) | ||
### Integration Tests Jenkins Job | ||
|
||
This job runs integration tests for a bundle via `test_integration.sh` in Jenkins. | ||
saratvemulapalli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
#### Job Parameters | ||
| name | description | | ||
|-------------|------------------------------------------------------------| | ||
| s3_bucket | Artifact S3 bucket | | ||
| opensearch_version | OpenSearch version | | ||
| build_id | Unique identifier for a bundle build | | ||
| architecture | CPU Architecture of bundle | | ||
| test_run_id | Unique identifier for a test run | | ||
|
Empty file.
This file was deleted.
Oops, something went wrong.
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
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.
Which manifest?
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.
Not sure if the question was what manifest do we use for integ tests. If it is, it uses build and bundle manifest and it fetches it by itself.
I would like to have #456 update this readme to add the rest of the new parameters to this readme.