-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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 periodic job to ES repo #48570
Move periodic job to ES repo #48570
Conversation
This change kickstarts the process of moving CI job definitions to this repo.
Pinging @elastic/es-core-infra (:Core/Infra/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.
This looks fine, but could you please add a README to .ci or .ci/jobs.t explaining the format of the yml files? I believe they are jjb, but to someone unfamiliar with the CI setup that would not be obvious.
@@ -0,0 +1,11 @@ | |||
#!/bin/bash |
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.
Perhaps we should have a .ci/scripts directory? Seems we are accumulating a lot of different shell scripts all at the root.
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.
That's a good idea. I'll move that in the next iteration, when I have to re-test this anyhow.
I definitely want to add some documentation for this ... It's JJBN the tool that wraps JJB but I think I'll just like to the lather, as the syntax is very similar and the former link is not public. |
.ci/jobs.t/defaults.yml
Outdated
reference-repo: "/var/lib/jenkins/.git-references/elasticsearch.git" | ||
branches: | ||
- "%BRANCH%" | ||
url: "https://github.com/atorok/elasticsearch.git" |
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.
Should this be the main repo?
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.
good catch!
Co-Authored-By: Rory Hunter <pugnascotia@users.noreply.github.com>
Co-Authored-By: Rory Hunter <pugnascotia@users.noreply.github.com>
Jobs live in the [jobs.t](jobs.t) directory, these are defined in YML using a syntax | ||
simmilar to [JJB](https://elasticsearch-ci.elastic.co/view/Elasticsearch%20master/). | ||
Macros are not allowed, and each job must be defined in its own file. | ||
Merging of the default configuration is customized so unlike in standard JJB, |
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.
Merging of the default configuration is customized so unlike in standard JJB, it recurses into YML objects.
This makes me so happy. The behavior in JJB was infuriating.
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.
Left some comments. I'm still a little tentative about this one. Seems like there are some significant tradeoffs with JJBB. Let's see if it's worthwhile in the end.
Also how does this work in practice? Will Jenkins automatically pick up this job as soon as this is merged? Do we have to somehow tell Jenkins to look for job definitions here? How does this work for pull requests? How do we whitelist/blacklist branches?
|
||
CI is run by Jenkins at [elasticsearch-ci](https://elasticsearch-ci.elastic.co/). | ||
Jobs live in the [jobs.t](jobs.t) directory, these are defined in YML using a syntax | ||
simmilar to [JJB](https://elasticsearch-ci.elastic.co/view/Elasticsearch%20master/). |
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.
What are the differences vs "vanilla" JJB? Is there some documentation in the infra repo we can link to 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.
There is but I didn't want to include it because it's not public.
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.
Would that be so bad? External folks would just get denied.
.ci/jobs.t/defaults.yml
Outdated
JAVA12_HOME=$HOME/.java/openjdk12 | ||
JAVA13_HOME=$HOME/.java/openjdk13 | ||
- shell: | | ||
#!/usr/local/bin/runbld --redirect-stderr {runbld_args} |
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.
Does JJB support parameterization? What does {runbld_args}
evaluate to here? I suspect this is just copy/paste leftovers from the original builder macro.
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.
you are correct, I changed it to default to last good commit.
We could also drop the shell
part to have no default, maybe that would be less confusing
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 think if the expectation is that the shell
bit is always overridden then having a default might not make sense.
fail: true | ||
- ansicolor | ||
- timestamps | ||
# TODO: No support un JJBB ? |
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 had to use a custom JJB module for this one. I'm not sure how that translate to JJBB. We need to sort this out though as this is how we gather published build scans from Jenkins. Without this HOMER won't be able to find build scans either so this is a show stopper IMO unless we can sort it out.
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 was planing on sorting this out before I remove the job from the .ci repo.
Right now it's ok to be missing the notifications because this will be an additional job, the purpose is to make sure all the mechanics of creating and updating the jobs work.
@mark-vieira see https://github.com/elastic/infra/pull/15687 as a starting point on how this works. TL;DR is that there are jobs on the infra side that trigger when the configuration changes and these get deployed automatically. For me these are the clear advantages:
|
@elasticmachine update branch |
@elasticmachine run elasticsearch-ci/2 and run elasticsearch-ci/1 |
How is this synchronized? I suspect there's no coordination between the JJBB job that updates the job definitions and the commit jobs. So we still might need to be careful here, or just live with the fact that we'll get some initial failures because we pushed a build config change that depends on a job config change that hasn't yet been deployed. |
Or we could move to another CI system that doesn't have this same limitation 😉 |
@mark-vieira are you saying we should drop this for now ? Keep the jobs in the infra repo until we have smth better ? |
No, definitely not. I think there are clear benefits here that more than likely outweigh the limitations. My above comment was mostly jest. I'm hoping eventually we find a solution w/o such limitation but for now let's push forward. |
@elasticmachine update branch |
* Move periodic job to ES repo This change kickstarts the process of moving CI job definitions to this repo. * Added a minimal readme to provide pointers to the documentation * Update .ci/README.md Co-Authored-By: Rory Hunter <pugnascotia@users.noreply.github.com> * Update .ci/README.md Co-Authored-By: Rory Hunter <pugnascotia@users.noreply.github.com> * point to main repo * PR review * Add link to JJBB
* Move periodic job to ES repo This change kickstarts the process of moving CI job definitions to this repo. * Added a minimal readme to provide pointers to the documentation * Update .ci/README.md Co-Authored-By: Rory Hunter <pugnascotia@users.noreply.github.com> * Update .ci/README.md Co-Authored-By: Rory Hunter <pugnascotia@users.noreply.github.com> * point to main repo * PR review * Add link to JJBB
* Move periodic job to ES repo This change kickstarts the process of moving CI job definitions to this repo. * Added a minimal readme to provide pointers to the documentation * Update .ci/README.md Co-Authored-By: Rory Hunter <pugnascotia@users.noreply.github.com> * Update .ci/README.md Co-Authored-By: Rory Hunter <pugnascotia@users.noreply.github.com> * point to main repo * PR review * Add link to JJBB
* Move periodic job to ES repo This change kickstarts the process of moving CI job definitions to this repo. * Added a minimal readme to provide pointers to the documentation * Update .ci/README.md Co-Authored-By: Rory Hunter <pugnascotia@users.noreply.github.com> * Update .ci/README.md Co-Authored-By: Rory Hunter <pugnascotia@users.noreply.github.com> * point to main repo * PR review * Add link to JJBB
Add the first job definition to the ES repo.
The goal is to move them all, this one paves the way.
Relates to https://github.com/elastic/infra/issues/15187