inserito steps/script x function...

This commit is contained in:
Samuele E. Locatelli
2017-11-08 16:54:53 +01:00
parent a95a319c9a
commit 1d14c60280
Vendored
+19 -17
View File
@@ -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