ridotto ulteriormente jenkinsfile... test deploy!

This commit is contained in:
Samuele E. Locatelli
2017-11-08 15:31:43 +01:00
parent 4f762c4528
commit 00b7958366
Vendored
+63 -43
View File
@@ -14,7 +14,7 @@ pipeline {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=633']) {
withEnv(['NEXT_BUILD_NUMBER=634']) {
// env.versionNumber = VersionNumber(versionNumberString : '4.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '4.8.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'MAPO'
@@ -214,48 +214,10 @@ pipeline {
sleep 2
bat "\"${tool 'MSBuild-14.0'}\" \"/p:AspnetMergePath=C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.2 Tools\" /T:Package /P:Configuration=Donati /p:PublishProfile=Donati.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/Donati/${env.versionNumber}/MP-TAB.zip /p:DeployIisAppPath=\"Default Web Site/MP/TAB\" /p:PackageAsSingleFile=True /p:OutputPath=bin/ MP-Tablet/MP-Tablet.csproj"
bat "E:\\Jenkins\\exportDropbox.bat \"${WORKSPACE}\\MP-Tablet\\ReleaseClienti\\Donati\" \"E:\\Staging\\byProd\\MP\\Donati\\MP-TAB\" "
},
failFast: false)
}
else{
echo 'Questo BRANCH non necessita di installer...'
}
}
}
}
// ora deploy FILES x Auto Update
stage('DeployAUF') {
agent any
steps {
// in primis compilo a seconda del branch... TUTTO tranne develop...
script {
// CAMBIO numero versione in file sorgente!!!
bat "fart.exe VersGen\\MoonPro.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0"
// // restore nuget packages
// bat "e:\\nuget.exe restore ${WORKSPACE}\\MAPO.sln"
}
// ora mi occupo delle operazioni di compressione e copia...
script {
parallel (
LANDING: {
sleep 0
},
ADMIN: {
sleep 0
},
IO: {
sleep 0
},
MON: {
sleep 0
},
SITE: {
sleep 0
},
TABLET: {
sleep 0
bat "\"${tool 'MSBuild-14.0'}\" \"/p:AspnetMergePath=C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.2 Tools\" /T:Package /P:Configuration=${env.BRANCH_NAME} /p:PublishProfile=${env.BRANCH_NAME}.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/${env.BRANCH_NAME}/MP-TAB.zip /p:DeployIisAppPath=\"Default Web Site/MP/TAB\" /p:PackageAsSingleFile=True /p:OutputPath=bin/ MP-Tablet/MP-Tablet.csproj"
// manifest.xml: aggiorno versNumber ed URL del branch di update...
// 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"
@@ -274,9 +236,67 @@ pipeline {
bat "xcopy /y MP-Tablet\\ReleaseClienti\\${env.BRANCH_NAME}\\MP-TAB.zip c:\\inetpub\\wwwroot\\SWS\\MAPO\\TAB\\${env.BRANCH_NAME}\\ "
},
failFast: false)
}
else{
echo 'Questo BRANCH non necessita di installer...'
}
}
}
}
// // ora deploy FILES x Auto Update
// stage('DeployAUF') {
// agent any
// steps {
// // in primis compilo a seconda del branch... TUTTO tranne develop...
// script {
// // CAMBIO numero versione in file sorgente!!!
// bat "fart.exe VersGen\\MoonPro.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0"
// // // restore nuget packages
// // bat "e:\\nuget.exe restore ${WORKSPACE}\\MAPO.sln"
// }
// // ora mi occupo delle operazioni di compressione e copia...
// script {
// parallel (
// LANDING: {
// sleep 0
// },
// ADMIN: {
// sleep 0
// },
// IO: {
// sleep 0
// },
// MON: {
// sleep 0
// },
// SITE: {
// sleep 0
// },
// TABLET: {
// sleep 0
// // bat "\"${tool 'MSBuild-14.0'}\" \"/p:AspnetMergePath=C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.2 Tools\" /T:Package /P:Configuration=${env.BRANCH_NAME} /p:PublishProfile=${env.BRANCH_NAME}.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/${env.BRANCH_NAME}/MP-TAB.zip /p:DeployIisAppPath=\"Default Web Site/MP/TAB\" /p:PackageAsSingleFile=True /p:OutputPath=bin/ MP-Tablet/MP-Tablet.csproj"
// // // 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}\\ "
// },
// failFast: false)
// }
// }
// }
}
post {
success {