-
Notifications
You must be signed in to change notification settings - Fork 122
docs: add ncu-ci run documentation #1060
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
Merged
+49
−0
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ Commands: | |
| ncu-ci rate <type> Calculate the green rate of a CI job in the last 100 | ||
| runs | ||
| ncu-ci walk <type> Walk the CI and display the failures | ||
| ncu-ci run <prid> Start a node-test-pull-request CI job for a PR | ||
| ncu-ci url <url> Automatically detect CI type and show results | ||
| ncu-ci pr <jobid> Show results of a node-test-pull-request CI job | ||
| ncu-ci commit <jobid> Show results of a node-test-commit CI job | ||
|
|
@@ -125,6 +126,54 @@ Possible use cases: | |
| ncu-ci walk pr --json database.json | ||
| ``` | ||
|
|
||
| ### `ncu-ci run <prid>` | ||
|
|
||
| `ncu-ci run <prid>` starts a `node-test-pull-request` Jenkins job for a pull request. | ||
|
|
||
| `<prid>` can be one of the following: | ||
|
|
||
| - a numeric pull request id, for example `34127` | ||
| - a pull request URL, for example `https://github.com/nodejs/node/pull/34127` | ||
| - a commit URL for the head commit of the pull request, for example `https://github.com/nodejs/node/pull/34127/commits/<sha>` | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a straightforward way to disambiguate "commit URL"? To me, a commit URL would ordinarily be /org/repo/commit/abcde... "pull request commit URL" perhaps? |
||
|
|
||
| If you pass a GitHub URL, `ncu-ci` will infer the repository owner, repository name, | ||
| and pull request id from the URL. When you pass a commit URL, it also uses the commit | ||
| SHA as the expected tip commit. | ||
|
|
||
| By default, `ncu-ci run` only starts CI when it can verify that the tip of the PR head | ||
| matches the latest approved commit. If that safety check cannot be satisfied, the | ||
| command refuses to start CI. | ||
|
|
||
| Options: | ||
|
|
||
| - `--certify-safe <sha>`: explicitly set the commit SHA that must be at the tip of the PR head | ||
| - `--check-for-duplicates`: check recent Jenkins runs and refuse to start a duplicate job for the same commit | ||
| - `--owner <owner>`: GitHub repository owner, used when `<prid>` is not a GitHub URL | ||
| - `--repo <repo>`: GitHub repository name, used when `<prid>` is not a GitHub URL | ||
|
|
||
| Examples: | ||
|
|
||
| Run CI for a PR number using repository information from config or flags: | ||
|
|
||
| ```sh | ||
| ncu-ci run 34127 --owner nodejs --repo node | ||
| ``` | ||
|
|
||
| Run CI by passing the pull request URL: | ||
|
|
||
| ```sh | ||
| ncu-ci run https://github.com/nodejs/node/pull/34127 | ||
| ``` | ||
|
|
||
| Run CI for a specific approved head commit and avoid starting a duplicate Jenkins job: | ||
|
|
||
| ```sh | ||
| ncu-ci run https://github.com/nodejs/node/pull/34127/commits/faa808326cb0 --check-for-duplicates | ||
|
mcollina marked this conversation as resolved.
Outdated
|
||
| ``` | ||
|
|
||
| If the PR has the `v8 engine` label, `ncu-ci run` also triggers the `node-test-commit-v8-linux` | ||
| job after the main PR CI job is started successfully. | ||
|
|
||
| ### `ncu-ci pr <jobid>` | ||
|
|
||
| `ncu-ci pr <jobid>` returns information about the results of a `node-test-pull-request` job. | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.