From 1d14c6028089927e489d0b9b1d6ee5ff1eda8f1e Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 8 Nov 2017 16:54:53 +0100 Subject: [PATCH] inserito steps/script x function... --- Jenkinsfile | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index fcf0797d..20661dd9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -259,24 +259,26 @@ pipeline { @NonCPS // Funzione x pubblicazione su server IIS di deploy def publishToDeployServer(resourcesPath, iisPath) { - script{ - echo 'INIZIO Chiamata function publishToDeployServer' - // manifest.xml: aggiorno versNumber ed URL del branch di update... - bat "fart.exe MP-Tablet\\Resources\\manifest.xml 1.0.0.0 ${env.versionNumber} || EXIT /B 0" - bat "fart.exe MP-Tablet\\Resources\\manifest.xml {{BRANCHNAME}} ${env.BRANCH_NAME} || EXIT /B 0" - bat "fart.exe MP-Tablet\\Resources\\ChangeLog.html {{CURRENT-REL}} ${env.versionNumber} || EXIT /B 0" - writeFile file: 'MP-Tablet\\changeLog.log', text: "${getChangeString()}" - powershell '(Get-Content MP-Tablet\\Resources\\ChangeLog.html) | ForEach-Object { $_ -replace \"{{LAST-CHANGES}}\", \"${getChangeString()}\" } | Set-Content MP-Tablet\\Resources\\ChangeLog.html' - // copio ed esporto in IIS02 i vari files .xml, .html, .zip - bat "xcopy /y MP-Tablet\\Resources\\manifest.xml c:\\inetpub\\wwwroot\\SWS\\MAPO\\TAB\\${env.BRANCH_NAME}\\ " - bat "xcopy /y MP-Tablet\\Resources\\ChangeLog.html c:\\inetpub\\wwwroot\\SWS\\MAPO\\TAB\\${env.BRANCH_NAME}\\ " - bat "xcopy /y MP-Tablet\\Resources\\logoSteamware.png c:\\inetpub\\wwwroot\\SWS\\MAPO\\TAB\\${env.BRANCH_NAME}\\ " + steps { + script{ + echo 'INIZIO Chiamata function publishToDeployServer' + // manifest.xml: aggiorno versNumber ed URL del branch di update... + bat "fart.exe MP-Tablet\\Resources\\manifest.xml 1.0.0.0 ${env.versionNumber} || EXIT /B 0" + bat "fart.exe MP-Tablet\\Resources\\manifest.xml {{BRANCHNAME}} ${env.BRANCH_NAME} || EXIT /B 0" + bat "fart.exe MP-Tablet\\Resources\\ChangeLog.html {{CURRENT-REL}} ${env.versionNumber} || EXIT /B 0" + writeFile file: 'MP-Tablet\\changeLog.log', text: "${getChangeString()}" + powershell '(Get-Content MP-Tablet\\Resources\\ChangeLog.html) | ForEach-Object { $_ -replace \"{{LAST-CHANGES}}\", \"${getChangeString()}\" } | Set-Content MP-Tablet\\Resources\\ChangeLog.html' + // copio ed esporto in IIS02 i vari files .xml, .html, .zip + bat "xcopy /y MP-Tablet\\Resources\\manifest.xml c:\\inetpub\\wwwroot\\SWS\\MAPO\\TAB\\${env.BRANCH_NAME}\\ " + bat "xcopy /y MP-Tablet\\Resources\\ChangeLog.html c:\\inetpub\\wwwroot\\SWS\\MAPO\\TAB\\${env.BRANCH_NAME}\\ " + bat "xcopy /y MP-Tablet\\Resources\\logoSteamware.png c:\\inetpub\\wwwroot\\SWS\\MAPO\\TAB\\${env.BRANCH_NAME}\\ " - // salvo copia della versione... - bat "xcopy /y MP-Tablet\\ReleaseClienti\\${env.BRANCH_NAME}\\* E:\\Staging\\byProd\\MP\\${env.BRANCH_NAME}\\MP-TAB\\${env.versionNumber}\\ " - // copio x AutoUpdate deploy - bat "xcopy /y MP-Tablet\\ReleaseClienti\\${env.BRANCH_NAME}\\MP-TAB.zip c:\\inetpub\\wwwroot\\SWS\\MAPO\\TAB\\${env.BRANCH_NAME}\\ " - echo 'FINE Chiamata function publishToDeployServer' + // salvo copia della versione... + bat "xcopy /y MP-Tablet\\ReleaseClienti\\${env.BRANCH_NAME}\\* E:\\Staging\\byProd\\MP\\${env.BRANCH_NAME}\\MP-TAB\\${env.versionNumber}\\ " + // copio x AutoUpdate deploy + bat "xcopy /y MP-Tablet\\ReleaseClienti\\${env.BRANCH_NAME}\\MP-TAB.zip c:\\inetpub\\wwwroot\\SWS\\MAPO\\TAB\\${env.BRANCH_NAME}\\ " + echo 'FINE Chiamata function publishToDeployServer' + } } } // Funzione x recupero changeLog