Skip to content

Commit

Permalink
Doc #107
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasbjerre committed Mar 27, 2019
1 parent cb04c67 commit c9edd4c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ Changelog of Generic Webhook Plugin.
**Doc**


[cb04c670d9177f5](https://github.com/jenkinsci/generic-webhook-trigger-plugin/commit/cb04c670d9177f5) Tomas Bjerre *2019-02-16 18:17:44*

**Doc**


[82d483a2f33fa7b](https://github.com/jenkinsci/generic-webhook-trigger-plugin/commit/82d483a2f33fa7b) Tomas Bjerre *2019-01-23 20:17:15*


Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ curl -v -H "Content-Type: application/json" -X POST -d '{ "app":{ "name":"some v

If you need the resolved values in pre build steps, like git clone, you need to add a parameter with the same name as the variable.

![Parameter](https://github.com/jenkinsci/generic-webhook-trigger-plugin/blob/master/sandbox/parameter-git-repo.png)
![Parameter](/sandbox/parameter-git-repo.png)

## Job DSL Plugin

Expand Down Expand Up @@ -168,7 +168,17 @@ pipelineJob('Generic Job Example') {

## Pipeline

**Note:** When configuring from pipeline, that pipeline needs to run once, to apply the plugin trigger config, and after that this plugin will be able to trigger the job. This is how Jenkins works, not something implemented in this plugin. You can avoid this by using Job DSL and have Job DSL create pipeline jobs with the plugin configured in that DSL.
When configuring from pipeline, that pipeline needs to run once, to apply the plugin trigger config, and after that this plugin will be able to trigger the job. This is how Jenkins works, not something implemented in this plugin.

This means that if you create a pipeline like this:

![Parameter](/sandbox/pipeline-pre-run.png)

You need to run it once to have the properties applied. You can verify that the properties has been applied by opening the configuration view (of view configuration if using multibranch pipeline) of the job. You will see that the "Generic Webhook Trigger" is checked and will now have values from your pipeline. Like this:

![Parameter](/sandbox/pipeline-post-run.png)

You can avoid having to run twice, by using Job DSL and have Job DSL create pipeline jobs with the plugin configured in that DSL.

This plugin can be used with the [Pipeline Multibranch Plugin](https://jenkins.io/doc/pipeline/steps/workflow-multibranch/#properties-set-job-properties).

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<findbugs.failOnError>false</findbugs.failOnError>
<maven.javadoc.skip>true</maven.javadoc.skip>
<fmt>2.8</fmt>
<violations.version>1.15</violations.version>
<violations.version>1.18</violations.version>
<changelog>1.59</changelog>
</properties>

Expand Down
Binary file added sandbox/pipeline-post-run.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sandbox/pipeline-pre-run.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c9edd4c

Please sign in to comment.