Skip to content
Permalink
Browse files

[JENKINS-33882] Added support for Job Exporter Plugin

  • Loading branch information
v1v committed Mar 29, 2016
1 parent c028e8c commit 2cb6b376f83001a503e8d7057d912397d20a600d
@@ -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)
@@ -0,0 +1,5 @@
job('example') {
steps {
exportRuntimeParameters()
}
}
@@ -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
*/
@@ -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.