Shell steps in the post-action block.

This commit is contained in:
Manuele Simi 2019-10-10 12:26:56 -04:00
parent 834e7c462e
commit b90b80ae42
1 changed files with 5 additions and 2 deletions

7
Jenkinsfile vendored
View File

@ -98,7 +98,6 @@ pipeline {
cp "${agent_root_folder}/${maven_settings_file}" "${agent_root_folder}/settings.xml"
echo "Done with local repository"
'''
}
}
// the maven-parent needs to be built (once) at each execution
@ -197,7 +196,11 @@ pipeline {
post {
always {
echo 'The default maven settings have been restored'
mv "${agent_root_folder}/settings.${PIPELINE_BUILD_NUMBER}" "${agent_root_folder}/settings.xml"
steps {
sh '''
mv "${agent_root_folder}/settings.${PIPELINE_BUILD_NUMBER}" "${agent_root_folder}/settings.xml"
'''
}
}
success {
echo 'The pipeline worked!'