All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javaposse.jobdsl.dsl.helpers.BuildParametersContextHelper.groovy Maven / Gradle / Ivy

There is a newer version: 1.22-rxd-2
Show newest version
package javaposse.jobdsl.dsl.helpers

import javaposse.jobdsl.dsl.JobType
import javaposse.jobdsl.dsl.WithXmlAction

class BuildParametersContextHelper extends AbstractContextHelper {

    BuildParametersContextHelper(List withXmlActions, JobType jobType) {
        super(withXmlActions, jobType)
    }

    def parameters(Closure closure) {
        execute(closure, new BuildParametersContext())
    }

    Closure generateWithXmlClosure(BuildParametersContext context) {
        return { Node project ->
            def parameterDefinitions = project / 'properties' / 'hudson.model.ParametersDefinitionProperty' / parameterDefinitions
            context.buildParameterNodes.values().each {
                parameterDefinitions << it
            }
        }
    }
}






© 2015 - 2024 Weber Informatics LLC | Privacy Policy