-
Notifications
You must be signed in to change notification settings - Fork 166
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
jenkins: post-build-status-update #973
Conversation
This creates a new `post-build-status-update` Jenkins Pipeline. It's job is to propogate build information from Jenkins CI to the GitHub Bot to GitHub. The pipeline created here will be called from node-test-commit-* sub build jobs through the [Parameterized Trigger Plugin](https://wiki.jenkins.io/display/JENKINS/Parameterized+Trigger+Plugin). The way this would be used is by creating pre and post build triggers through the plugin, which would call this pipeline. My suggestion is that we woll this out to one or two jobs (maybe the linter?), try it out, and then after that roll it out to all sub builds. Hopefully, this PR should finally fix the yellow CI statuses on GitHub! Refs: nodejs#790
I tried this out on ci.nodejs.org, and it works -- check out nodejs/node#14998 and nodejs/node#16703. |
Where will this end up being run? I guess we need to add the worker IP addresses to the bot whitelist? We do all of the work on test-packetnet-ubuntu1604-x64-1 and test-packetnet-ubuntu1604-x64-2, if we're able to restrict this work to those then that'd be easy I suppose. |
Yep -- all (26) of the builds so far have taken place on either of these two machines. These are the only two |
great @maclover7, what are the next steps, do we merge this, add a github-based pipeline for it, add that plugin and wire it up? |
@rvagg yep, here are the next steps:
|
ok, unless anyone @nodejs/build objects I'd be happy to push forward with @maclover7 on this plan today(ish) |
Yes, we map Jenkin's "unstable" status to runs that fail on only known flaky tests. Which means "failures are unrelated to current PR", so AFAICT they should be reported as passing for the PR (could have a "some tests were flaky" message) |
@refack Ok -- I've added a commit where if the status is unstable then a different message will be shown, but it will be shown as passing in the GitHub UI. |
Did a run of the jenkinsfile, and nodejs/node#14998 |
Just found this and wanted to give props for the work! Thanks @maclover7 🙏 💯 |
Suggestion: I'd put the file in a new |
Going to merge this in -- it looks like the plugin is already installed on ci.nodejs.org (yay!), so I just need to have write access to node-test-linter to start rolling this out :) |
This creates a new `post-build-status-update` Jenkins Pipeline. It's job is to propogate build information from Jenkins CI to the GitHub Bot to GitHub. The pipeline created here will be called from node-test-commit-* sub build jobs through the [Parameterized Trigger Plugin](https://wiki.jenkins.io/display/JENKINS/Parameterized+Trigger+Plugin). The way this would be used is by creating pre and post build triggers through the plugin, which would call this pipeline. My suggestion is that we woll this out to one or two jobs (maybe the linter?), try it out, and then after that roll it out to all sub builds. Hopefully, this PR should finally fix the yellow CI statuses on GitHub! PR-URL: #973 Refs: #790 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Landed in 58019a5, going to keep this PR open until node-test-linter is setup :) |
FYI since we don't do auditing or backporting, you can just use the Green button to "rebase merge" if the commits are good as is, or "squash merge" is you want to edit the commit message. |
Great job finding a way for us to get up-n-running again! |
Looks like everything is going okay right now... assuming no failures, would someone be able to set me up with access to configure the remaining node-test-* jobs? I can rollout the rest tomorrow or Monday, would be great to wrap this up. |
Hopefully done, let me know if I missed any. |
@gibfahn thanks! Here's the current upgrade status:
Could use permissions on a few more jobs, and then not sure what should be done with |
I added
|
thanks @refack, updating now |
Settings updated -- going to close and move discussion back to #790. |
Great work!!! |
@maclover7 just noticed this in the bot logs: 07:39:51.639Z ERROR bot: Got error when retrieving GitHub commits for PR (req_id=ec2629b5-a83f-4c5b-baa3-9408674e316c, pr=canary, job=test/linux, status=success)
err: {
"code": "400",
"status": "Bad Request",
"message": "Invalid value for parameter 'number': canary"
}
..
07:43:44.384Z ERROR bot: Got error when retrieving GitHub commits for PR (req_id=5b885da5-728a-4757-9d78-38bd0918c41e, pr=canary, job=test/linux-fips, status=success)
err: {
"code": "400",
"status": "Bad Request",
"message": "Invalid value for parameter 'number': canary"
} Got any thoughts why some jobs seems to be posting |
That'd be from the scheduled daily jobs. They don't have an associated PR and aren't started from node-test-pull-request. In fact some collaborators (myself included) often just use node-test-commit or one of its children directly without giving a PR. So maybe just check if the PR value is numeric or not before posting to the bot? |
There's also |
Yeah, I was worried this would happen. I tried locally to add a conditional step as a wrapper around triggering |
Hmm, actually, what do you think about passing the |
Make sure PR is a number, and the `POST_STATUS_TO_PR` is set. Refs: nodejs#973 (comment)
+1 on checking @maclover7 correct me if I'm wrong, but I think #981 will work. |
Make sure PR is a number, and the `POST_STATUS_TO_PR` is set. Refs: nodejs#973 (comment)
This creates a new
post-build-status-update
Jenkins Pipeline. It's jobis to propogate build information from Jenkins CI to the GitHub Bot to
GitHub. The pipeline created here will be called from node-test-commit-*
sub build jobs through the Parameterized Trigger Plugin.
The way this would be used is by creating pre and post build triggers
through the plugin, which would call this pipeline. My suggestion is
that we woll this out to one or two jobs (maybe the linter?), try it
out, and then after that roll it out to all sub builds.
Hopefully, this PR should finally fix the yellow CI statuses on GitHub!
Refs: #790