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 {
}
}
}
}
--
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/56a1cf68-fc40-47df-b30b-95c2ce02bd8bn%40googlegroups.com.