|
||||||||
|
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira |
||||||||
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

I have implemented the second option. I just realized there is a third: offer the SimpleBuildStep, but issue an error in case the build is not an AbstractBuild and one or more ManagedFile lacks a targetLocation (thus forcing use of temp files). In this case the workflow would be responsible for cleanup:
node { try { step([$class: 'ConfigFileBuildStep', managedFiles: [[fileId: 'DefaultMavenSettingsProvider.production', targetLocation: 'settings-prod.xml']]]) { sh 'mvn -s settings-prod.xml deploy' } } finally { sh 'rm -f settings-prod.xml' } }