properties = null
@NonCPSdef loadProperties() { checkout scm File propertiesFile = new File('${workspace}/pipeline.properties') propertiesFile.withInputStream { properties.load(propertiesFile) }}
pipeline { agent none stages { stage ('prepare') { agent any steps { script { loadProperties() echo "${properties['repo']}" } } } stage('Build') { agent any steps { sh 'echo ${properties.repo}' } } }}
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f054f784-9126-406a-8de7-baabac9f6998%40googlegroups.com.--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/8DJwV2laHCM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-users+unsubscribe@googlegroups.com.