semplificato deploy x ogni brach + eliminazione conf data...

This commit is contained in:
Samuele E. Locatelli
2017-10-25 12:01:09 +02:00
parent 7e02c625d7
commit 2a745b8ea4
Vendored
+22 -33
View File
@@ -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/**'
}
}
}