Skip to content

Commit

Permalink
Tweaking docs #92
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasbjerre committed Nov 26, 2018
1 parent 8ba5bcd commit 4f4d3c0
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Changelog of Generic Webhook Plugin.
**Adding example of ignoring push event with zero commits**


[1b8e9b3a25fe7a7](https://github.com/jenkinsci/generic-webhook-trigger-plugin/commit/1b8e9b3a25fe7a7) Tomas Bjerre *2018-11-16 19:40:12*
[8ba5bcd28356fba](https://github.com/jenkinsci/generic-webhook-trigger-plugin/commit/8ba5bcd28356fba) Tomas Bjerre *2018-11-16 19:51:45*

**Example of ignoring removal or creation of branches**

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ If you are fiddling with expressions, you may want to checkout:

* [This JSONPath site](http://jsonpath.herokuapp.com/)
* [This XPath site](http://www.freeformatter.com/xpath-tester.html)
* [This regexp site](https://jex.im/regulex/)
* [This regexp site](https://jex.im/regulex/) Also syntax [here](https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html).

It's probably easiest to do with `curl`. Given that you have configured a Jenkins job to trigger on Generic Webhook, here are some examples of how to start the jobs.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<f:entry title="Value filter">
<f:textbox field="regexpFilter" />
<f:description>
Optional. Anything in the evaluated value, matching this <a href="https://jex.im/regulex/">regular expression</a>, will be removed. Having [^0-9] would only allow numbers.
Optional. Anything in the evaluated value, matching this <a href="https://jex.im/regulex/">regular expression</a>, will be removed. Having <b>[^0-9]</b> would only allow numbers. The regexp syntax is documented <a href="https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html" target="_blank">here</a>.
</f:description>
</f:entry>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<f:entry title="Value filter">
<f:textbox field="regexpFilter" />
<f:description>
Optional. Anything in the evaluated value, matching this <a href="https://jex.im/regulex/">regular expression</a>, will be removed. Having [^0-9] would only allow numbers.
Optional. Anything in the evaluated value, matching this <a href="https://jex.im/regulex/">regular expression</a>, will be removed. Having <b>[^0-9]</b> would only allow numbers. The regexp syntax is documented <a href="https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html" target="_blank">here</a>.
</f:description>
</f:entry>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
<p>
You can fiddle with XPath <a href="http://www.freeformatter.com/xpath-tester.html">here</a>. You may also want to checkout the syntax <a href="https://www.w3schools.com/xml/xpath_syntax.asp">here</a>.
</p>
<p>
You can fiddle with regular expressions <a href="https://jex.im/regulex/">here</a>. You may also want to checkout the syntax <a href="https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html">here</a>.
</p>
<p>
If your job <b>is not parameterized</b>, then the resolved variables will just be contributed to the build. If your job <b>is parameterized</b>, and you resolve variables that have the same name as those parameters, then the plugin will populate the parameters when triggering job. That means you can, for example, use the parameters in combination with an SCM plugin, like GIT Plugin, to pick a branch.
</p>
Expand Down Expand Up @@ -83,14 +86,14 @@
<f:entry title="Expression">
<f:textbox field="regexpFilterExpression"/>
<f:description>
<a href="https://jex.im/regulex/">Regular expression</a> to test on the evaluated text specified below.
<a href="https://jex.im/regulex/">Regular expression</a> to test on the evaluated text specified below. The regexp syntax is documented <a href="https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html" target="_blank">here</a>.
</f:description>
</f:entry>

<f:entry title="Text">
<f:textbox field="regexpFilterText"/>
<f:description>
Text to test for given <a href="https://jex.im/regulex/">regular expression</a>. You can use the variables you specified above.
Text to test for the given <a href="https://jex.im/regulex/">expression</a>. You can use any combination of the variables you configured above.
</f:description>
</f:entry>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@
<f:textbox field="key"/>
</f:entry>

<f:entry title="Expression" description="Expression to evaluate in POST content.">
<f:entry title="Expression">
<f:textbox field="value" />
<f:entry>
<f:radio name="expressionType" field="expressionType" value="JSONPath" title="JSONPath" checked="${instance.expressionType == 'JSONPath'}"/>
</f:entry>
<f:entry>
<f:radio name="expressionType" field="expressionType" value="XPath" title="XPath" checked="${instance.expressionType == 'XPath'}"/>
</f:entry>
<f:description>
Expression to evaluate in POST content. Use <a href="https://github.com/jayway/JsonPath">JSONPath</a> for JSON or <a href="https://www.w3schools.com/xml/xpath_syntax.asp">XPath</a> for XML.
</f:description>
</f:entry>

<f:entry title="Value filter">
<f:textbox field="regexpFilter" />
<f:description>
Optional. Anything in the evaluated value, matching this <a href="https://jex.im/regulex/">regular expression</a>, will be removed. Having [^0-9] would only allow numbers.
Optional. Anything in the evaluated value, matching this <a href="https://jex.im/regulex/" target="_blank">regular expression</a>, will be removed. Having <b>[^0-9]</b> would only allow numbers. The regexp syntax is documented <a href="https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html" target="_blank">here</a>.
</f:description>
</f:entry>

Expand Down

0 comments on commit 4f4d3c0

Please sign in to comment.