-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Move gradle-check code to its own scripts and upload codecov #3742
Move gradle-check code to its own scripts and upload codecov #3742
Conversation
Note: Gradle Check is failing due to core code change, not due to my PR changes here. |
- name: Checkout opensearch-build repo | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: opensearch-project/opensearch-build |
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.
Instead of having dependency on the build repo. Can we do something suggested here: #3717 (comment)?
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.
Nope, that workflow have not been maintained for over 3 years and it is in 0.0.1 version.
I will not use that for production purposes.
Thanks.
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.
Also that one is for API token not the same as generic webhook, where we can pass a lot of information between github and Jenkins.
I dont see a dependency on opensearch-build is an issue the jenkinsfile is in opensearch-build already.
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.
Can we have the scripts present in OpenSearch repo? Also, a good practice to mark the conversation resolved by the reviewer can be find here
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.
The point to present it in opensearch-build repo is so that you dont need to backport to every single branch whenever there is a tiny change.
Remember you have more than 10+ branches need gradle check.
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.
Thanks for raising this issues tho, but I believe this is the best way to get gradle check start running.
We can always improve in later PRs.
Thanks.
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.
@peterzhuamazon : Thanks for your effort in pulling up this change.
Regarding location of gradle script, I think it logically belongs to OpenSearch repository. Once the change is stabilized (green runs on main), we can backport this to remaining branches. Going forward; there wouldn't be work needed for future branches cut from main (or release branches).
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.
@dreamer-89 that's a good point, I have seen both (central repo for build scripts and replicating build scripts across many branches). I think having build material along each branch is the best option when build scripts are trivial or non-existent (like pure Github actions let say). When build scripts are non-trivial (I think this is our case at least now), keeping them centralized at some place (build repository / library) serves better.
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.
Hi @reta @dreamer-89
Yes that is the reason why I keep the script in build repo for now.
All the existing actions on market are either not meeting our needs, or too old without any maintenance.
We can improve this later by either forking one of the existing actions, or write a new one to replace.
Right now, like you suggested, it is best to leave it in build repo for now.
Thanks.
Signed-off-by: Peter Zhu <[email protected]>
08591e6
to
6f84aad
Compare
Signed-off-by: Peter Zhu <[email protected]>
Signed-off-by: Peter Zhu <[email protected]>
* Move gradle-check to script, add codecov, add comments Signed-off-by: Peter Zhu <[email protected]> * Add more improvements on comments handling Signed-off-by: Peter Zhu <[email protected]> * Add more comments Signed-off-by: Peter Zhu <[email protected]> (cherry picked from commit 3681ac7)
* Move gradle-check to script, add codecov, add comments Signed-off-by: Peter Zhu <[email protected]> * Add more improvements on comments handling Signed-off-by: Peter Zhu <[email protected]> * Add more comments Signed-off-by: Peter Zhu <[email protected]> (cherry picked from commit 3681ac7)
* Move gradle-check to script, add codecov, add comments Signed-off-by: Peter Zhu <[email protected]> * Add more improvements on comments handling Signed-off-by: Peter Zhu <[email protected]> * Add more comments Signed-off-by: Peter Zhu <[email protected]> (cherry picked from commit 3681ac7)
* Move gradle-check to script, add codecov, add comments Signed-off-by: Peter Zhu <[email protected]> * Add more improvements on comments handling Signed-off-by: Peter Zhu <[email protected]> * Add more comments Signed-off-by: Peter Zhu <[email protected]> (cherry picked from commit 3681ac7)
…3747) * Move gradle-check to script, add codecov, add comments Signed-off-by: Peter Zhu <[email protected]> * Add more improvements on comments handling Signed-off-by: Peter Zhu <[email protected]> * Add more comments Signed-off-by: Peter Zhu <[email protected]> (cherry picked from commit 3681ac7) Co-authored-by: Peter Zhu <[email protected]>
…3746) * Move gradle-check to script, add codecov, add comments Signed-off-by: Peter Zhu <[email protected]> * Add more improvements on comments handling Signed-off-by: Peter Zhu <[email protected]> * Add more comments Signed-off-by: Peter Zhu <[email protected]> (cherry picked from commit 3681ac7) Co-authored-by: Peter Zhu <[email protected]>
…3745) * Move gradle-check to script, add codecov, add comments Signed-off-by: Peter Zhu <[email protected]> * Add more improvements on comments handling Signed-off-by: Peter Zhu <[email protected]> * Add more comments Signed-off-by: Peter Zhu <[email protected]> (cherry picked from commit 3681ac7) Co-authored-by: Peter Zhu <[email protected]>
…3744) * Move gradle-check to script, add codecov, add comments Signed-off-by: Peter Zhu <[email protected]> * Add more improvements on comments handling Signed-off-by: Peter Zhu <[email protected]> * Add more comments Signed-off-by: Peter Zhu <[email protected]> (cherry picked from commit 3681ac7) Co-authored-by: Peter Zhu <[email protected]>
…rch-project#3742) * Move gradle-check to script, add codecov, add comments Signed-off-by: Peter Zhu <[email protected]> * Add more improvements on comments handling Signed-off-by: Peter Zhu <[email protected]> * Add more comments Signed-off-by: Peter Zhu <[email protected]>
…rch-project#3742) (opensearch-project#3744) * Move gradle-check to script, add codecov, add comments Signed-off-by: Peter Zhu <[email protected]> * Add more improvements on comments handling Signed-off-by: Peter Zhu <[email protected]> * Add more comments Signed-off-by: Peter Zhu <[email protected]> (cherry picked from commit 3681ac7) Co-authored-by: Peter Zhu <[email protected]>
* [Backport 1.x] Add gradle check test for github workflows (Testing again) (#3724) * [Backport 1.x] Add gradle check test for github workflows (Testing again) * [Backport 1.x] Add gradle check test for github workflows (Testing again) Signed-off-by: Peter Zhu <[email protected]> * Remove linter Signed-off-by: Peter Zhu <[email protected]> * Update github action gradle-check to use pull_request_target for accessing token (#3728) (#3730) * Check out gradle Signed-off-by: Peter Zhu <[email protected]> * Tweak titles Signed-off-by: Peter Zhu <[email protected]> (cherry picked from commit 4f7bf08) Co-authored-by: Peter Zhu <[email protected]> * Move gradle-check code to its own scripts and upload codecov (#3742) (#3744) * Move gradle-check to script, add codecov, add comments Signed-off-by: Peter Zhu <[email protected]> * Add more improvements on comments handling Signed-off-by: Peter Zhu <[email protected]> * Add more comments Signed-off-by: Peter Zhu <[email protected]> (cherry picked from commit 3681ac7) Co-authored-by: Peter Zhu <[email protected]> Co-authored-by: Peter Zhu <[email protected]> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Signed-off-by: Peter Zhu [email protected]
Description
Move gradle-check code to its own scripts.
It is not easy to keep updating all the branches with any workflow changes in code.
Therefore, move the gradle check code to its own scripts.
This also attempt to upload codecoverage xml to codecov if gradle check success.
Issues Resolved
opensearch-project/opensearch-build#2193
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.