Hi,
I've got a build job with a pipeline, like below. (Lots of details omitted, obviously.)
Now, according to the "Pipeline Utility Steps", I understand, that I can use something
like
def props = readProperties file: 'dir/my.properties', text: 'other=Override'
to read a property file from the workspace. Questions:
1.) Where in the pipeline script would I place the above statement?
(Preferrably at a central location, like right at the beginning.)
2.) How can I use these properties? What I would like to have would be
something like
if (props["build.host"]) {
ssh ${build.host} sh "Some Command"
} else {
sh "Some Command"
}
Thanks,
Jochen
pipeline {
agent any
tools {
maven 'Maven3'
jdk 'Java8'
}
stages {
stage ('build') {
steps {
withMaven(
) {
script {
}
}
}
}
stage ('collect profiler data') {
steps {
}
}
}
}