forked from Applitools-Dev/eyes.jenkins
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from nikita-andreev/master
Job DSL extension
- Loading branch information
Showing
3 changed files
with
39 additions
and
12 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
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
20 changes: 20 additions & 0 deletions
20
src/main/java/com/applitools/jenkins/ApplitoolsJobDsl.java
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,20 @@ | ||
package com.applitools.jenkins; | ||
|
||
import hudson.Extension; | ||
import javaposse.jobdsl.dsl.helpers.wrapper.WrapperContext; | ||
import javaposse.jobdsl.plugin.ContextExtensionPoint; | ||
import javaposse.jobdsl.plugin.DslExtensionMethod; | ||
|
||
@Extension(optional = true) | ||
public class ApplitoolsJobDsl extends ContextExtensionPoint { | ||
@DslExtensionMethod(context = WrapperContext.class) | ||
public Object Applitools(String serverUrl) { | ||
return new ApplitoolsBuildWrapper(serverUrl); | ||
} | ||
|
||
@DslExtensionMethod(context = WrapperContext.class) | ||
public Object Applitools() { | ||
return new ApplitoolsBuildWrapper(ApplitoolsCommon.APPLITOOLS_DEFAULT_URL); | ||
} | ||
|
||
} |