Skip to content

Commit

Permalink
[JENKINS-33882] Added support for Job Exporter Plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Mar 29, 2016
1 parent c028e8c commit 2cb6b37
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/Home.md
Expand Up @@ -21,6 +21,8 @@ Browse the Jenkins issue tracker to see any [open issues](https://issues.jenkins

## Release Notes
* 1.45 (unreleased)
* Added support for the [Job Exporter Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Job+Exporter+Plugin)
([JENKINS-33882](https://issues.jenkins-ci.org/browse/JENKINS-33882))
* Added support for the [CMake Plugin](https://wiki.jenkins-ci.org/display/JENKINS/CMake+Plugin)
([JENKINS-33829](https://issues.jenkins-ci.org/browse/JENKINS-33829))
* Added support for the [JIRA Plugin](https://wiki.jenkins-ci.org/display/JENKINS/JIRA+Plugin)
Expand Down
@@ -0,0 +1,5 @@
job('example') {
steps {
exportRuntimeParameters()
}
}
Expand Up @@ -1170,6 +1170,16 @@ class StepContext extends AbstractExtensibleContext {
stepNodes << cmakeNode
}

/**
* Exports runtime parameters into a properties file .
*
* @since 1.45
*/
@RequiresPlugin(id = 'job-exporter', minimumVersion = '0.4')
void exportRuntimeParameters() {
stepNodes << new NodeBuilder().'com.meyling.hudson.plugin.job__exporter.ExporterBuilder'()
}

/**
* @since 1.35
*/
Expand Down
Expand Up @@ -3702,4 +3702,16 @@ class StepContextSpec extends Specification {
}
1 * jobManagement.requireMinimumPluginVersion('cmakebuilder', '2.4.1')
}

def 'call exportRuntimeParameters method'() {
when:
context.exportRuntimeParameters()

then:
context.stepNodes.size() == 1
with(context.stepNodes[0]) {
name() == 'com.meyling.hudson.plugin.job__exporter.ExporterBuilder'
}
1 * jobManagement.requireMinimumPluginVersion('job-exporter', '0.4')
}
}

0 comments on commit 2cb6b37

Please sign in to comment.