Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JENKINS-31879] Added support for DOS Trigger plugin
- Loading branch information
Showing
4 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
...re/src/main/docs/examples/javaposse/jobdsl/dsl/helpers/triggers/TriggerContext/dos.groovy
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,7 @@ | ||
job('example') { | ||
triggers { | ||
dos('@daily') { | ||
triggerScript('set CAUSE=Build successfully triggered by dostrigger.') | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/triggers/DosTriggerContext.groovy
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,15 @@ | ||
package javaposse.jobdsl.dsl.helpers.triggers | ||
|
||
import javaposse.jobdsl.dsl.Context | ||
|
||
class DosTriggerContext implements Context { | ||
String triggerScript | ||
|
||
/** | ||
* It sets the script that will be executed periodically which indicates that a build should be started | ||
* when the script sets the CAUSE variable to something. | ||
*/ | ||
void triggerScript(String triggerScript) { | ||
this.triggerScript = triggerScript | ||
} | ||
} |
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
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