def jenkinsNodeLabel()

in vars/slingOsgiBundleBuild.groovy [145:157]


def jenkinsNodeLabel(String operatingSystem, def jobConfig, def globalConfig) {
    def branchConfig = jobConfig?.branches?."$env.BRANCH_NAME" ?: [:]
    if ( branchConfig.nodeLabel ) {
        echo "Using branch specific node label ${branchConfig.nodeLabel}"
        return branchConfig.nodeLabel
    } else {
        def label = globalConfig.availableOperatingSystems[operatingSystem]
        if ( !label )
            error("Unknown operating system ${operatingSystem}. Available operating systems: ${globalConfig.availableOperatingSystems}")
        echo "Using operating-system ${operatingSystem} specific node label ${label}"
        return label
    }
}