In a declarative pipeline, is it possible to define a variable for a
settings file in the environment section?
Currently many of my stages have for following form
steps {
configFileProvider([configFile(fileId:'M3',variable:'MAVEN_SETTINGS')]) {
sh 'mvn -s $MAVEN_SETTINGS ...'
}
}
Since it appears in basically every stage I think it really clutters up
the pipeline. I'd like to do something like this
environment {
MAVEN_SETTINGS = configFile('M3')
}
...
steps {
sh 'mvn -s $MAVEN_SETTINGS ...'
}
I've been combing through the docs but have not found anything. Does anyone
know if something like this is possible?
Thanks
--
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/d20a5a02-8cfd-4e01-bc98-04b167992989%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.