From 2a745b8ea49919c697ce3900bc135034afc7f951 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 25 Oct 2017 12:01:09 +0200 Subject: [PATCH] semplificato deploy x ogni brach + eliminazione conf data... --- Jenkinsfile | 55 +++++++++++++++++++++-------------------------------- 1 file changed, 22 insertions(+), 33 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b1dcf893..3294ce98 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -60,47 +60,36 @@ pipeline { steps { // in primis compilo a seconda del branch... TUTTO tranne develop... script { - if (env.BRANCH_NAME == "develop") { - // CAMBIO numero versione in file sorgente!!! - bat "fart.exe VersGen\\VersGen.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0" - // restore nuget packages - bat "e:\\nuget.exe restore ${WORKSPACE}\\IOB-WIN.sln" - // BUILD! - bat "\"${tool 'MSBuild-14.0'}\" IOB-WIN/IOB-WIN.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /m" - } - else { - echo 'Nothing to Build...' - } + // CAMBIO numero versione in file sorgente!!! + bat "fart.exe VersGen\\VersGen.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0" + // restore nuget packages + bat "e:\\nuget.exe restore ${WORKSPACE}\\IOB-WIN.sln" + // BUILD! + bat "\"${tool 'MSBuild-14.0'}\" IOB-WIN/IOB-WIN.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /m" } // ora mi occupo delle operazioni di compressione e copia... script { - /* DEPLOY condizionale: develop / master / demo_ovh */ - if (env.BRANCH_NAME == "develop") { - // // elimino files di conf personalizzata per ogni install... - // bat "RD /S /Q IOB-WIN\\bin\\Release\\DATA" + // elimino files di conf personalizzata per ogni install... + bat "RD /S /Q IOB-WIN\\bin\\Release\\DATA" - // Compressione in .zip dell'installer... - // powershell -ExecutionPolicy Unrestricted -File file.ps1 - - // manifest.xml: aggiorno versNumber ed URL del branch di update... - bat "fart.exe IOB-WIN\\Resources\\manifest.xml 1.0.0.0 ${env.versionNumber} || EXIT /B 0" - bat "fart.exe IOB-WIN\\Resources\\manifest.xml {{BRANCHNAME}} ${env.BRANCH_NAME} || EXIT /B 0" - // copio ed esporto in IIS02 i vari files .xml, .html, .zip - bat "xcopy /y IOB-WIN\\Resources\\manifest.xml c:\\inetpub\\wwwroot\\SWS\\MAPO-IOB-WIN\\${env.BRANCH_NAME}\\ " - bat "xcopy /y IOB-WIN\\Resources\\ChangeLog.html c:\\inetpub\\wwwroot\\SWS\\MAPO-IOB-WIN\\${env.BRANCH_NAME}\\ " + // Compressione in .zip dell'installer... + // powershell -ExecutionPolicy Unrestricted -File file.ps1 + + // manifest.xml: aggiorno versNumber ed URL del branch di update... + bat "fart.exe IOB-WIN\\Resources\\manifest.xml 1.0.0.0 ${env.versionNumber} || EXIT /B 0" + bat "fart.exe IOB-WIN\\Resources\\manifest.xml {{BRANCHNAME}} ${env.BRANCH_NAME} || EXIT /B 0" + // copio ed esporto in IIS02 i vari files .xml, .html, .zip + bat "xcopy /y IOB-WIN\\Resources\\manifest.xml c:\\inetpub\\wwwroot\\SWS\\MAPO-IOB-WIN\\${env.BRANCH_NAME}\\ " + bat "xcopy /y IOB-WIN\\Resources\\ChangeLog.html c:\\inetpub\\wwwroot\\SWS\\MAPO-IOB-WIN\\${env.BRANCH_NAME}\\ " - // // MAPO-IOB-WIN.zip: copio ed esporto in IIS02 - // bat "xcopy /y IOB-WIN\\ReleaseClienti\\${env.BRANCH_NAME}\\${env.versionNumber}\\MAPO-IOB-WIN.zip c:\\inetpub\\wwwroot\\SWS\\MAPO-IOB-WIN\\${env.BRANCH_NAME} " + // // MAPO-IOB-WIN.zip: copio ed esporto in IIS02 + // bat "xcopy /y IOB-WIN\\ReleaseClienti\\${env.BRANCH_NAME}\\${env.versionNumber}\\MAPO-IOB-WIN.zip c:\\inetpub\\wwwroot\\SWS\\MAPO-IOB-WIN\\${env.BRANCH_NAME} " - // bat "E:\\Jenkins\\exportInstaller.bat \"${WORKSPACE}\\IOB-WIN\\ReleaseClienti\\${env.BRANCH_NAME}\" \"E:\\Staging\\byProd\\MAPO-IOB-WIN\\${env.BRANCH_NAME}\" " + // bat "E:\\Jenkins\\exportInstaller.bat \"${WORKSPACE}\\IOB-WIN\\ReleaseClienti\\${env.BRANCH_NAME}\" \"E:\\Staging\\byProd\\MAPO-IOB-WIN\\${env.BRANCH_NAME}\" " - //bat "E:\\Jenkins\\exportDropbox.bat \"${WORKSPACE}\\MP\\ReleaseClienti\\Donati\" \"E:\\Staging\\byProd\\MP\\Donati\\MP-LAND\" " - // dropbox configName: 'Donati', remoteDirectory: 'installers/MP-LAND', removePrefix: 'ReleaseClienti/Donati', sourceFiles: 'ReleaseClienti/Donati/**' - } - else { - echo 'Nothing to Copy...' - } + //bat "E:\\Jenkins\\exportDropbox.bat \"${WORKSPACE}\\MP\\ReleaseClienti\\Donati\" \"E:\\Staging\\byProd\\MP\\Donati\\MP-LAND\" " + // dropbox configName: 'Donati', remoteDirectory: 'installers/MP-LAND', removePrefix: 'ReleaseClienti/Donati', sourceFiles: 'ReleaseClienti/Donati/**' } } }