forked from uber-archive/phabricator-jenkins-plugin
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add advanced usage and TOC (uber-archive#172)
* Add advanced usage and TOC * Pngcrush * Update haiku
- Loading branch information
1 parent
71c25da
commit 5f61696
Showing
12 changed files
with
87 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
work/ | ||
target/ | ||
.idea | ||
.DS_Store |
This file contains 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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
Advanced Usage | ||
============== | ||
|
||
In addition to Unit and Coverage results, this plugin supports two additional features | ||
you may want to take use of. Both options take a maximum number of bytes to copy, since the plugin | ||
is executed on the Jenkins master and syncing multiple megabytes of data can cause | ||
performance problems. | ||
|
||
Custom Comments | ||
--------------- | ||
|
||
If you'd like to post additional text back to Phabricator, you can add text to the `.phabricator-comment` file | ||
(you can change the name of the file in your job configuration page): | ||
|
||
 | ||
|
||
Any text present in this file will be echoed verbatim to the comment that Jenkins posts back to | ||
Phabricator. If you'd like to preserve formatting, check the "Preserve Formatting" block and the | ||
plugin will surround the comment in triple-backticks (```) | ||
|
||
Custom Lint | ||
----------- | ||
|
||
If you'd like to send Lint Violations as well, you can echo Harbormaster-compatible JSON | ||
(where each line is a valid JSON dictionary) into the `.phabricator-lint` file. | ||
|
||
Although each **line** must be valid JSON, note that the file as a whole is **not valid JSON** | ||
(e.g. if you call `JSON.parse('.phabricator-lint')`) it will fail. This is a design decision to | ||
make it easy for build scripts to `tee` (echo line-by-line) violations without having to | ||
produce well-formed JSON, which requires knowing upfront how many violations are present. | ||
|
||
 | ||
|
||
If a job was configured to run the following shell script: | ||
|
||
```bash | ||
mkdir example | ||
echo "Once upon a time\nThere was a Jenkins plugin" > example/path | ||
# NOTE: tee -a to support appending multiple lints | ||
echo '{"name": "Comment Name", "code": "Haiku", "severity": "error", "path": "example/path", "line": 2, "char": 0, "description": "Line is not a Haiku" }' | tee -a .phabricator-lint | ||
``` | ||
|
||
You would see the following in your differential at the top: | ||
|
||
 | ||
|
||
And the following in the code view: | ||
|
||
 | ||
|
||
See [Harbormaster Lint](https://secure.phabricator.com/conduit/method/harbormaster.sendmessage/) | ||
API for details on the supported JSON keys. `line`, `char`, and `description` are all optional. | ||
The rest are required. | ||
|
||
The severity parameter recognizes these severity levels: | ||
|
||
| Key | Name | | ||
|----------|----------| | ||
| advice | Advice | | ||
| autofix | Auto-Fix | | ||
| warning | Warning | | ||
| error | Error | | ||
| disabled | Disabled | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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