-
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
Added jenkinsfile to run gradle check in OpenSearch #2166
Conversation
Can one of the admins verify this patch? |
✅ Gradle Check success b30ca615221dbb8097a6fdb00dff663304ebe693 |
jenkins/gradle-check-assemble.sh
Outdated
docker ps | ||
docker stop `docker ps -qa` > /dev/null 2>&1 | ||
|
||
cd search |
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.
Similar question, why is this needed?
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.
I have stated many times that search is just a folder name of the repo.
If you just git clone opensearch then the default folder is opensearch not search.
The reason we use search back in the day because opensearch naming is not defined.
If you clone as opensearch (which seems like you do in the jenkins file), you should remove cd into search and cd into the corresponding folder instead.
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.
Sure that makes sense, the question was to @owaiskazi19, do we still need this ?
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.
Changed the design. Created a new ubuntu docker image for gradle check purpose and run it in a jenkisnfile. We don't need the scripts anymore.
jenkins/gradle-check-assemble.sh
Outdated
REPORTS_DIR=`find ./search -name reports` | ||
zip -9 -q -r gradle_check_${BUILD_NUMBER}_reports.zip ${REPORTS_DIR} | ||
ls | grep "gradle_check_${BUILD_NUMBER}" |
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 a blocker for this PR, just a thought:
Looks like we can publish code coverage results from here.
cc: @tlfeng
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.
I see a lot of code directly copy paste from previous Jenkins without considering the circumstances of the new Jenkins and why the old code was being written that way.
I also would like to see some results of this workflow in practice before approving it.
Seems like the jenkins pipeline file is also written in scripted
way instead of decalarative
which makes the maintenance a bit harder.
Block this PR for now as I am concerned about the outcome of this PR.
Hi Owais, Also realize this is not even a Jenkins Pipeline file, but instead a dsl groovy which we are not using anymore.
Thanks. cc: @bbarani |
Signed-off-by: Owais Kazi <[email protected]>
Signed-off-by: Owais Kazi <[email protected]>
Thanks for the input here @peterzhuamazon. I have pushed the changes. |
start 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.
Great to see such a short JenkinsFile :)
agent { | ||
docker { | ||
label 'AL2-X64' | ||
image 'opensearchstaging/ci-runner:ci-runner-ubuntu1804-build-v1' |
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.
Maybe add link to this docker file: https://github.com/opensearch-project/opensearch-build/blob/main/docker/ci/dockerfiles/build.ubuntu18.opensearch.x64.dockerfile if anyone wants to see whats in the docker image
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.
Sounds good. Pushed the change. Thanks for the review :)
Signed-off-by: Owais Kazi <[email protected]>
@@ -0,0 +1,32 @@ | |||
pipeline { | |||
agent { |
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.
@owaiskazi19 - Can you help create a test case for this job and add timeout as well? Thank you!
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.
@abhinavGupta16 can you create an issue for the above so that it can be pick up later? 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.
@owaiskazi19 - #2690 . There you go!
* Added jenkinsfile for gradle check Signed-off-by: Owais Kazi <[email protected]> * Added jenkinsfile to run gradle check Signed-off-by: Owais Kazi <[email protected]> * PR comment Signed-off-by: Owais Kazi <[email protected]> (cherry picked from commit f1d35d0)
* Added jenkinsfile for gradle check Signed-off-by: Owais Kazi <[email protected]> * Added jenkinsfile to run gradle check Signed-off-by: Owais Kazi <[email protected]> * PR comment Signed-off-by: Owais Kazi <[email protected]> (cherry picked from commit f1d35d0)
* Added jenkinsfile for gradle check Signed-off-by: Owais Kazi <[email protected]> * Added jenkinsfile to run gradle check Signed-off-by: Owais Kazi <[email protected]> * PR comment Signed-off-by: Owais Kazi <[email protected]> (cherry picked from commit f1d35d0) Co-authored-by: Owais Kazi <[email protected]>
* Added jenkinsfile for gradle check Signed-off-by: Owais Kazi <[email protected]> * Added jenkinsfile to run gradle check Signed-off-by: Owais Kazi <[email protected]> * PR comment Signed-off-by: Owais Kazi <[email protected]> (cherry picked from commit f1d35d0) Co-authored-by: Owais Kazi <[email protected]>
Signed-off-by: Owais Kazi [email protected]
Description
Created a new ubuntu docker image for gradle check. Link
Added a jenkinsfile to run gradle check in OpenSearch. After jenkins go public logs will be available in the CI.
Sample run: http://opens-jenki-a7sro6sneahz-2051798054.us-west-2.elb.amazonaws.com/job/Gradle_Check/job/Gradle_Check/4/console
Steps to run the jenkinsfile:
main
.jenkins/jenkinsfile
.Issues Resolved
Closes #2507
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.