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

Convert freestyle gradle check to Jenkinsfile and migrate to public jenkins #851

Closed
peterzhuamazon opened this issue Nov 1, 2021 · 16 comments
Assignees
Labels
cicd enhancement New Enhancement jenkins Jenkins related issue

Comments

@peterzhuamazon
Copy link
Member

Is your feature request related to a problem? Please describe

Convert freestyle gradle check to Jenkinsfile.

Describe the solution you'd like

#74 (comment)

Describe alternatives you've considered

No response

Additional context

No response

@peterzhuamazon peterzhuamazon added enhancement New Enhancement untriaged Issues that have not yet been triaged labels Nov 1, 2021
@peterzhuamazon peterzhuamazon self-assigned this Nov 1, 2021
@peterzhuamazon peterzhuamazon removed the untriaged Issues that have not yet been triaged label Nov 1, 2021
@peterzhuamazon
Copy link
Member Author

Seems like builder does not support pipeline syntax as of yet.
jenkinsci/ghprb-plugin#719

@dblock
Copy link
Member

dblock commented Nov 17, 2021

I labeled this 1.3.0 because OpenSearch gradle check needs to use the same JDK as defined in the .properties file in the branch.

@reta
Copy link
Contributor

reta commented Nov 17, 2021

@peterzhuamazon I think it is possible to use Jenkinsfile with Github Pull Request builder [1]. At least, when pipeline is created, there is an option to configure Github Pull Request builder and Jenkins file from SCM (I believe it could be set to the base branch like 1.x / main or use the pull request one, have to double check that). Have you tried to configure pipeline with Github Pull Request builder already? If not, I could give you a hand here.

https://medium.com/openwhisk/how-to-make-jenkins-pipeline-jobs-triggered-by-pull-requests-for-apache-projects-2a526f0eb366

@peterzhuamazon
Copy link
Member Author

@peterzhuamazon I think it is possible to use Jenkinsfile with Github Pull Request builder [1]. At least, when pipeline is created, there is an option to configure Github Pull Request builder and Jenkins file from SCM (I believe it could be set to the base branch like 1.x / main or use the pull request one, have to double check that). Have you tried to configure pipeline with Github Pull Request builder already? If not, I could give you a hand here.

https://medium.com/openwhisk/how-to-make-jenkins-pipeline-jobs-triggered-by-pull-requests-for-apache-projects-2a526f0eb366

Thanks @reta I will take a look at this.
Currently a bit busy with new releases and RPM creation.

Thanks.

@peterzhuamazon
Copy link
Member Author

Although ghprb plugin is usable in pipeline workflow, it cannot be saved in the Jenkinsfile itself for backup. However, since it is very easy to setup, this can be a way for later.

@reta
Copy link
Contributor

reta commented Nov 18, 2021

That is correct, thank you for update.

@bbarani
Copy link
Member

bbarani commented Apr 26, 2022

@peterzhuamazon @gaiksaya Is this issue still valid?

@peterzhuamazon
Copy link
Member Author

We can wait until the public jenkins is live as ghprb settings would be different to use push instead of pull mode.

@peterzhuamazon peterzhuamazon changed the title Convert freestyle gradle check to Jenkinsfile Convert freestyle gradle check to Jenkinsfile and migrate to public jenkins Jun 23, 2022
@peterzhuamazon
Copy link
Member Author

Some explanations to the questions I get:

  1. Why do we set 130min for Github Actions timeout?
    Because gradle check jenkinsfile have a 120min timeout, once jenkins abort the run we need extra time for github action to retrieve the information, output the status, cleanup runners, etc. Therefore, adding 10min extra to the github actions timeout to be 130min to be safe.

  2. Why do you set 7200seconds timeout within the github actions shell call?
    The jenkins workflow can have zombie process or stuck process during the run, therefore, we need a mechanism to actively curl Jenkins for run information as well as timeout in case Jenkins failed to do so. This 7200seconds value is matching jenkins 120min timeout value.

  3. Why are we use agent node directly without using any containers?
    Jenkins gradle check requires a lot of resources from the runner, having a container would definitely impact the performance of the runner. Moreover, gradle check would spawn containers with docker-compose during the run, and running container in container is messy to manage and make it run correctly. Therefore, we directly run the gradle check workflows in agent node.

@peterzhuamazon
Copy link
Member Author

@reta Please be aware Gradle Check now does not need start gradle check or rebasing to restart. You can just re-run it as any other github actions.

image

Thanks.

@peterzhuamazon
Copy link
Member Author

New Bug per @mch2 as we still need jdk14 for gradle check.

* What went wrong:
Execution failed for task ':distribution:bwc:bugfix:buildBwcDarwinTar'.
> JAVA14_HOME required

@peterzhuamazon
Copy link
Member Author

peterzhuamazon commented Nov 30, 2022

Andrew Improvement:

@peterzhuamazon
Copy link
Member Author

Reta add JDK19:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cicd enhancement New Enhancement jenkins Jenkins related issue
Projects
None yet
Development

No branches or pull requests

4 participants