-
Notifications
You must be signed in to change notification settings - Fork 277
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
[Build] Add OpenSearch Dashboards to Jenkinsfile #717
Conversation
My concerns are: We are branching with @peternied @peterzhuamazon What do you think this should look like in terms of files/includes/libraries? |
Sure, I originally had it split. I can dump it into |
We should have mirroring pipelines for OpenSearch vs. OpenSearch Dashboards, so if you make this jenkins/OpenSearch-Dashboards/Jenkinsfile, move the OpenSearch one as well. |
Creates OpenSearch Dashboards Jenkinsfile basically copying what was in the existing OpenSearch Jenkinsfile. But skipping snapshots since it was not doing anything with snapshots and publishing to S3 bucket paths of `/builds/dashboards/` and `/bundles/dashboards/` which has not been verified yet. It was done this way, while keeping OpenSearch to build to `/builds` and `/bundles`, to reduce the impact of adding OpenSearch Dashboards. For consistency, moved the root lvl Jenkinsfile which was only building OpenSearch to `jenkins/opensearch`. Issue resolved: opensearch-project#620 Signed-off-by: Kawika Avilla <[email protected]>
d041e18
to
879de42
Compare
If this goes in, existing Jenkins pipelines will need to be updated. |
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.
rename underscore opensearch_dashboards to opensearch-dashboards
def artifactPath = "${manifest.build.version}/${OPENSEARCH_BUILD_ID}/${manifest.build.architecture}"; | ||
|
||
withAWS(role: 'opensearch-bundle', roleAccount: "${AWS_ACCOUNT_PUBLIC}", duration: 900, roleSessionName: 'jenkins-session') { | ||
s3Upload(file: 'artifacts', bucket: "${ARTIFACT_BUCKET_NAME}", path: "builds/dashboards/${artifactPath}") |
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 there any intermediate output for dashboards in builds that's useful? In opensearch this is artifacts being published to maven for example; so do we need to upload it?
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.
We can build the "snapshots" which would does not include the --release flag to the build here. Should publish that as well to the S3 bucket?
script { | ||
// Stages must be explicitly added to prevent overwriting | ||
// See https://ryan.himmelwright.net/post/jenkins-parallel-stashing/ | ||
def stages = ['build-x86', 'build-arm64'] |
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.
there is no x64?
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.
x86 is x64 in this context because @mch2 did not change the name on the 1st place.
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.
Let's fix it in both please.
I just started with #669 but haven't implemented. I agree we should have consistency for naming to separate OpenSearch and OpenSearch Dashboard. |
I copied the format of |
Handling the feedback without any question: * Remove JAVA arg since it is unneeded for OpenSearch Dashboards. * Change from x86 to x64 * Change S3 bucket from dashboards to opensearch-dashboards Signed-off-by: Kawika Avilla <[email protected]>
That one is a source code namespace, while this is a name of a product, albeit lowercase. |
Update from feedback with potential to require more discussion. * Rename folder from jenkins/opensearch_dashboards to jenkins/opensearch-dashboards * Build ID from OPENSEARCH_BUILD_ID to OPENSEARCH_DASHBOARDS_BUILD_ID Signed-off-by: Kawika Avilla <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #717 +/- ##
=======================================
Coverage 87.59% 87.59%
=======================================
Files 72 72
Lines 1919 1919
=======================================
Hits 1681 1681
Misses 238 238
Continue to review full report at Codecov.
|
@@ -27,7 +27,7 @@ def __init__( | |||
build_id=None, | |||
output_dir="artifacts", | |||
): | |||
self.build_id = os.getenv("OPENSEARCH_BUILD_ID") or build_id or uuid.uuid4().hex | |||
self.build_id = os.getenv("OPENSEARCH_BUILD_ID") or os.getenv("OPENSEARCH_DASHBOARDS_BUILD_ID") or build_id or uuid.uuid4().hex |
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.
This definitely tells me that we should merge these into a single variable. Then I think there was a comment on why we rename BUILD_NUMBER
to OPENSEARCH_DASHBOARDS_BUILD_ID
. Feels like all these things could be collapsed into a single BUILD_NUMBER
. Wouldn't it make things a lot simpler?
Plus we'll also refactor Jenkinsfile into a shared library at some point I'm sure to avoid all this code duplication.
When I merge this, is everything going to break given that the OpenSearch Jenklinsfile moved? How do we get this pipeline into Jenkins? |
When the job configuration is managed in source code this will be more possible, but that code will live in the CI repo and require its own deployment which will still result in some down time. We are effectively breaking the public interface of this system every time we rename/move these files, which I assume at some point we will do that less |
So YOLO. |
I've updated the jenkins path for opensearch build project on our jenkins instance. |
Description
Creates OpenSearch Dashboards Jenkinsfile basically copying what was
in the existing OpenSearch Jenkinsfile. But skipping snapshots since
it was not doing anything with snapshots and publishing to S3
bucket paths of
/builds/dashboards/
and/bundles/dashboards/
whichhas not been verified yet. It was done this way, while keeping OpenSearch
to build to
/builds
and/bundles
, to reduce the impact of addingOpenSearch Dashboards.
For consistency, moved the root lvl Jenkinsfile which was only building
OpenSearch to
jenkins/opensearch
.Signed-off-by: Kawika Avilla [email protected]
Issues Resolved
#620
Check List
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.