Skip to content
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

Add a new Jenkins job for the smoke test #5225

Merged
merged 5 commits into from
Jan 8, 2025

Conversation

zelinh
Copy link
Member

@zelinh zelinh commented Jan 6, 2025

Description

Add a new jenkinsfile for the smoke test Jenkins job intended for CI with distribution build job.

Issues Resolved

Part of #5224

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

stash includes: '**', name: "smoketest-opensearch-$BUILD_NUMBER"

timeout(time: 1, unit: 'HOURS') {
node(AGENT_LABEL) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this similar to integTest where each plugin will have its own container?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not exactly. All testing plugins would be tested with only one deployed container.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean all plugins would run sequentially one after the other?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far yes. All tests should be lightweight.

jenkins/opensearch/smoke-test.jenkinsfile Outdated Show resolved Hide resolved
jenkins/opensearch/smoke-test.jenkinsfile Outdated Show resolved Hide resolved
Signed-off-by: Zelin Hao <[email protected]>
Comment on lines +15 to +20
def docker_images = [
'tar': 'opensearchstaging/ci-runner:ci-runner-al2-opensearch-build-v1',
'rpm': 'opensearchstaging/ci-runner:ci-runner-almalinux8-systemd-base-integtest-v1',
'deb': 'opensearchstaging/ci-runner:ci-runner-ubuntu2004-systemd-base-integtest-v3',
'zip': 'opensearchstaging/ci-runner:ci-runner-windows2019-opensearch-build-v1',
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we need to add these docker images sooner as workflows are increasing. #4233

jenkins/opensearch/smoke-test.jenkinsfile Outdated Show resolved Hide resolved
stash includes: '**', name: "smoketest-opensearch-$BUILD_NUMBER"

timeout(time: 1, unit: 'HOURS') {
node(AGENT_LABEL) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean all plugins would run sequentially one after the other?

@zelinh zelinh force-pushed the smoke-test-test branch 3 times, most recently from c342946 to d9e1e0e Compare January 7, 2025 21:57
Copy link

codecov bot commented Jan 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.12%. Comparing base (13225f2) to head (d9e1e0e).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5225      +/-   ##
==========================================
- Coverage   92.35%   92.12%   -0.24%     
==========================================
  Files         197      202       +5     
  Lines        6814     7033     +219     
==========================================
+ Hits         6293     6479     +186     
- Misses        521      554      +33     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

jenkins/opensearch/smoke-test.jenkinsfile Outdated Show resolved Hide resolved
try {
stage("Smoke_tests") {
checkout scm
sleep 20
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need sleep here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking it may need time for the job to checkout source code

Signed-off-by: Zelin Hao <[email protected]>
Signed-off-by: Zelin Hao <[email protected]>
Comment on lines 102 to 103
docker.withRegistry('https://public.ecr.aws/') {
docker.image(docker_images["$distribution"]).inside(docker_args["$distribution"]) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should just switch to the pipeline standard:
https://github.com/opensearch-project/opensearch-build/blob/main/jenkins/opensearch/distribution-build.jenkinsfile#L157C21-L164C22

Since you just need one runner and you just need 2+ minutes to run all the plugins.

Also suggest to set the timeout at the job level and set it to 30min instead of 1 hour. Thanks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far we only onboard opensearch core component and it takes around 2-3 minutes for smoke tests. We would expect some additional time when more components coming in. I think we set it to 1 hour to be safe for now and may see how it goes in future.

I will update the pipeline for agent & docker as suggested here. Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in the latest commit. Thanks!

@zelinh zelinh merged commit de1f5d4 into opensearch-project:main Jan 8, 2025
10 checks passed
@zelinh zelinh deleted the smoke-test-test branch January 8, 2025 22:38
@zelinh zelinh restored the smoke-test-test branch January 8, 2025 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants