After searching around for examples and not finding good ones, I have this 
one:

A sample text properties file with this data:
property1=value1
property2=value2
property3=value3

and my pipeline looks like:
///////////////////////////
//Pipeline starts here
/////////////////
import groovy.io.FileType
import groovy.json.*
import hudson.model.Result
import java.util.Properties

node {
    Properties properties = new Properties()
    
    configFileProvider([configFile(fileId: 'asq213', variable: 
'fileLocation')]) {
        File propertiesFile = new File("${env.fileLocation}")
        properties.load(propertiesFile.newDataInputStream())
    }

        println properties.property1
        println properties.property2
        println properties.property3
}

///////////////////////////
//Pipeline ends here
/////////////////

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/31936bde-2b08-499a-b75f-b89aae987684%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to