Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED JENKINS-31883] Added support for NAnt plugin
Added a release notes for NAnt Plugin and since tag
- Loading branch information
Showing
5 changed files
with
135 additions
and
1 deletion.
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
12 changes: 12 additions & 0 deletions
12
...dsl-core/src/main/docs/examples/javaposse/jobdsl/dsl/helpers/step/StepContext/nant.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,12 @@ | ||
job('example') { | ||
steps { | ||
nant { | ||
target('test') | ||
targets(['publish', 'deploy']) | ||
prop('logging', 'info') | ||
props('test.threads': 10, 'input.status': 'release') | ||
buildFile('dir1/build.xml') | ||
nantInstallation('NAnt 1.8') | ||
} | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/step/NAntContext.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,56 @@ | ||
package javaposse.jobdsl.dsl.helpers.step | ||
|
||
import javaposse.jobdsl.dsl.Context | ||
|
||
class NAntContext implements Context { | ||
List<String> targets = [] | ||
List<String> props = [] | ||
String buildFile | ||
String nantInstallation | ||
|
||
/** | ||
* Specifies an NAnt target to be invoked. Can be called multiple times to add more targets. | ||
*/ | ||
void target(String target) { | ||
targets << target | ||
} | ||
|
||
/** | ||
* Specifies NAnt targets to be invoked. Can be called multiple times to add more targets. | ||
*/ | ||
void targets(Iterable<String> targets) { | ||
targets.each { | ||
target(it) | ||
} | ||
} | ||
|
||
/** | ||
* Specifies a property for the NAnt build. Can be called multiple times to add more properties. | ||
*/ | ||
void prop(Object key, Object value) { | ||
props << "${key}=${value}" | ||
} | ||
|
||
/** | ||
* Specifies properties for the NAnt build. Can be called multiple times to add more properties. | ||
*/ | ||
void props(Map<String, String> map) { | ||
map.entrySet().each { | ||
prop(it.key, it.value) | ||
} | ||
} | ||
|
||
/** | ||
* Specifies the build file to be invoked. | ||
*/ | ||
void buildFile(String buildFile) { | ||
this.buildFile = buildFile | ||
} | ||
|
||
/** | ||
* Specifies the name of the NAnt installation to be used for this build step. | ||
*/ | ||
void nantInstallation(String nantInstallationName) { | ||
nantInstallation = nantInstallationName | ||
} | ||
} |
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