From b66becd9782cf343b5934ea3293eb7ddfa18aa36 Mon Sep 17 00:00:00 2001 From: Manuele Simi Date: Thu, 10 Oct 2019 10:58:50 -0400 Subject: [PATCH] Add steps block around the post-action. --- Jenkinsfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e76125f..b4464fd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -196,9 +196,11 @@ pipeline { // post-build actions post { always { - // restore the default maven settings - mv "${agent_root_folder}/settings.${PIPELINE_BUILD_NUMBER}" "${agent_root_folder}/settings.xml" - echo 'The default maven settings have been restored' + steps { + // restore the default maven settings + mv "${agent_root_folder}/settings.${PIPELINE_BUILD_NUMBER}" "${agent_root_folder}/settings.xml" + echo 'The default maven settings have been restored' + } } success { echo 'The pipeline worked!'