For others who come to this, another solution is to use a script scripter, where you pass the path to the .properties file, and the script adds properties to the list of job variables:
Properties properties = new Properties() FilePath workspace = build.getWorkspace() FilePath sourceFile = workspace.child(path) properties.load(sourceFile.read()) properties.each { key, value -> key = key.replace(".", "_").toUpperCase() Job.setVariable(build, key, value) println "Created Variable: " + key + "=" + value }
This converts any periods to underscores and capital letters of all letters. Using a scriptler script ensures that you have a method that works regardless of the "plugin soup" you use.
source share