accorpato deploy/install

This commit is contained in:
Samuele E. Locatelli
2017-11-02 16:02:08 +01:00
parent ddc0c57c76
commit 4a92d7a6f4
Vendored
+114 -92
View File
@@ -38,7 +38,6 @@ pipeline {
bat "e:\\nuget.exe restore ${WORKSPACE}\\GMW.sln"
// bat "e:\\nuget.exe restore ${WORKSPACE}\\GMW_Data.sln"
// bat "e:\\nuget.exe restore ${WORKSPACE}\\GMW_Terminus.sln"
script {
/* compilo installers in base al BRANCH del cliente... */
if (env.BRANCH_NAME == "develop") {
@@ -62,36 +61,33 @@ pipeline {
stage('Test') {
steps {
script {
/* compilo installers in base al BRANCH del cliente... */
if (env.BRANCH_NAME == "develop") {
parallel (
GMW: {
sleep 0
// bat "\"${tool 'MSBuild-14.0'}\" GMW/GMW.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /m"
echo 'Testing.. 2 be done...'
},
GMWT: {
sleep 1
// bat "\"${tool 'MSBuild-14.0'}\" GMW_Term/GMW_Term.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /m"
echo 'Testing.. 2 be done...'
},
failFast: false)
}
else {
echo 'Nothing to Test...'
}
/* compilo installers in base al BRANCH del cliente... */
parallel (
GMW: {
sleep 0
// bat "\"${tool 'MSBuild-14.0'}\" GMW/GMW.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /m"
echo 'Testing.. 2 be done...'
},
GMWT: {
sleep 1
// bat "\"${tool 'MSBuild-14.0'}\" GMW_Term/GMW_Term.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /m"
echo 'Testing.. 2 be done...'
},
failFast: false)
}
}
}
stage('Deploy') {
stage('Deploy-Installers') {
agent any
steps {
// // CAMBIO numero versione in file sorgente + recupero packages
// bat "e:\\fart.exe ${WORKSPACE}\\VersGen\\GMW.cs 000.000 ${env.versionNumber} || EXIT /B 0"
// bat "e:\\nuget.exe restore ${WORKSPACE}\\GMW.sln"
// // bat "e:\\nuget.exe restore ${WORKSPACE}\\GMW_Data.sln"
// // bat "e:\\nuget.exe restore ${WORKSPACE}\\GMW_Terminus.sln"
script {
/* DEPLOY condizionale: develop / master */
if (env.BRANCH_NAME == "develop") {
// CAMBIO numero versione in file sorgente + recupero packages
bat "fart.exe ${WORKSPACE}\\VersGen\\GMW.cs 000.000 ${env.versionNumber} || EXIT /B 0"
bat "e:\\nuget.exe restore ${WORKSPACE}\\GMW.sln"
if (env.BRANCH_NAME == "develop") {
parallel (
GMW_TK: {
sleep 0
@@ -110,82 +106,108 @@ pipeline {
failFast: false)
}
else if (env.BRANCH_NAME == "TK_GMW") {
// CAMBIO numero versione in file sorgente + recupero packages
bat "fart.exe ${WORKSPACE}\\VersGen\\GMW.cs 000.000 ${env.versionNumber} || EXIT /B 0"
bat "e:\\nuget.exe restore ${WORKSPACE}\\GMW.sln"
GMW_TK: {
sleep 0
bat "\"${tool 'MSBuild-14.0'}\" \"/p:AspnetMergePath=C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.2 Tools\" /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01_TK.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:Configuration=IIS01_TK /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ GMW/GMW.csproj"
}
parallel (
GMW_TK: {
sleep 0
bat "\"${tool 'MSBuild-14.0'}\" \"/p:AspnetMergePath=C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.2 Tools\" /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01_TK.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:Configuration=IIS01_TK /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ GMW/GMW.csproj"
},
TEST: {
sleep 1
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=TK_test /p:PublishProfile=TK_test.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/TK_test/Build_${env.versionNumber}/GMW.zip /p:PackageAsSingleFile=True /p:OutputPath=bin/ GMW/GMW.csproj"
bat "E:\\Jenkins\\exportDropbox.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\TK_test\" \"E:\\Staging\\byProd\\GMW\\TK_test\\GMW-site\" "
// bat "E:\\Jenkins\\exportInstaller.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\TK_test\" \"E:\\Staging\\GMW\\GMW-site\\TK_test\" "
dropbox configName: 'Mazzucconi - Tekal', remoteDirectory: 'File_Installazione_GMW_Test', removePrefix: 'GMW/ReleaseClienti/TK_test', sourceFiles: 'GMW/ReleaseClienti/TK_test/**'
},
PROD: {
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=TK_prod /p:PublishProfile=TK_prod.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/TK_prod/Build_${env.versionNumber}/GMW.zip /p:PackageAsSingleFile=True /p:OutputPath=bin/ GMW/GMW.csproj"
bat "E:\\Jenkins\\exportDropbox.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\TK_prod\" \"E:\\Staging\\byProd\\GMW\\TK_prod\\GMW-site\" "
// bat "E:\\Jenkins\\exportInstaller.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\TK_prod\" \"E:\\Staging\\GMW\\GMW-site\\TK_prod\" "
dropbox configName: 'Mazzucconi - Tekal', remoteDirectory: 'File_Installazione_GMW', removePrefix: 'GMW/ReleaseClienti/TK_prod', sourceFiles: 'GMW/ReleaseClienti/TK_prod/**'
},
failFast: false)
}
else if (env.BRANCH_NAME == "SP_GMW") {
// CAMBIO numero versione in file sorgente + recupero packages
bat "fart.exe ${WORKSPACE}\\VersGen\\GMW.cs 000.000 ${env.versionNumber} || EXIT /B 0"
bat "e:\\nuget.exe restore ${WORKSPACE}\\GMW.sln"
GMW_SP: {
sleep 1
bat "\"${tool 'MSBuild-14.0'}\" \"/p:AspnetMergePath=C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.2 Tools\" /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01_SP.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:Configuration=IIS01_SP /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ GMW/GMW.csproj"
}
parallel (
GMW_SP: {
sleep 0
bat "\"${tool 'MSBuild-14.0'}\" \"/p:AspnetMergePath=C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.2 Tools\" /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01_SP.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:Configuration=IIS01_SP /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ GMW/GMW.csproj"
},
TEST: {
sleep 1
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=SP_test /p:PublishProfile=SP_test.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/SP_test/Build_${env.versionNumber}/GMW.zip /p:PackageAsSingleFile=True /p:OutputPath=bin/ GMW/GMW.csproj"
bat "E:\\Jenkins\\exportDropbox.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\SP_test\" \"E:\\Staging\\byProd\\GMW\\SP_test\\GMW-site\" "
// bat "E:\\Jenkins\\exportInstaller.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\SP_test\" \"E:\\Staging\\GMW\\GMW-site\\SP_test\" "
dropbox configName: 'Mazzucconi - San Possidonio', remoteDirectory: 'File_Installazione_GMW_Test', removePrefix: 'GMW/ReleaseClienti/SP_test', sourceFiles: 'GMW/ReleaseClienti/SP_test/**'
},
PROD: {
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=SP_prod /p:PublishProfile=SP_prod.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/SP_prod/Build_${env.versionNumber}/GMW.zip /p:PackageAsSingleFile=True /p:OutputPath=bin/ GMW/GMW.csproj"
bat "E:\\Jenkins\\exportDropbox.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\SP_prod\" \"E:\\Staging\\byProd\\GMW\\SP_prod\\GMW-site\" "
// bat "E:\\Jenkins\\exportInstaller.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\SP_prod\" \"E:\\Staging\\GMW\\GMW-site\\SP_prod\" "
dropbox configName: 'Mazzucconi - San Possidonio', remoteDirectory: 'File_Installazione_GMW', removePrefix: 'GMW/ReleaseClienti/SP_prod', sourceFiles: 'GMW/ReleaseClienti/SP_prod/**'
},
failFast: false)
}
else {
echo 'Nothing to deploy...'
}
}
}
}
stage('Installers') {
agent any
steps {
script {
/* compilo installers in base al BRANCH del cliente... */
if (env.BRANCH_NAME == "TK_GMW") {
// CAMBIO numero versione in file sorgente + recupero packages
bat "fart.exe ${WORKSPACE}\\VersGen\\GMW.cs 000.000 ${env.versionNumber} || EXIT /B 0"
bat "e:\\nuget.exe restore ${WORKSPACE}\\GMW.sln"
parallel (
TEST: {
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=TK_test /p:PublishProfile=TK_test.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/TK_test/Build_${env.versionNumber}/GMW.zip /p:PackageAsSingleFile=True /p:OutputPath=bin/ GMW/GMW.csproj"
bat "E:\\Jenkins\\exportDropbox.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\TK_test\" \"E:\\Staging\\byProd\\GMW\\TK_test\\GMW-site\" "
// bat "E:\\Jenkins\\exportInstaller.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\TK_test\" \"E:\\Staging\\GMW\\GMW-site\\TK_test\" "
dropbox configName: 'Mazzucconi - Tekal', remoteDirectory: 'File_Installazione_GMW_Test', removePrefix: 'GMW/ReleaseClienti/TK_test', sourceFiles: 'GMW/ReleaseClienti/TK_test/**'
},
PROD: {
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=TK_prod /p:PublishProfile=TK_prod.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/TK_prod/Build_${env.versionNumber}/GMW.zip /p:PackageAsSingleFile=True /p:OutputPath=bin/ GMW/GMW.csproj"
bat "E:\\Jenkins\\exportDropbox.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\TK_prod\" \"E:\\Staging\\byProd\\GMW\\TK_prod\\GMW-site\" "
// bat "E:\\Jenkins\\exportInstaller.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\TK_prod\" \"E:\\Staging\\GMW\\GMW-site\\TK_prod\" "
dropbox configName: 'Mazzucconi - Tekal', remoteDirectory: 'File_Installazione_GMW', removePrefix: 'GMW/ReleaseClienti/TK_prod', sourceFiles: 'GMW/ReleaseClienti/TK_prod/**'
},
failFast: false)
}
else if (env.BRANCH_NAME == "SP_GMW") {
// CAMBIO numero versione in file sorgente + recupero packages
bat "fart.exe ${WORKSPACE}\\VersGen\\GMW.cs 000.000 ${env.versionNumber} || EXIT /B 0"
bat "e:\\nuget.exe restore ${WORKSPACE}\\GMW.sln"
parallel (
TEST: {
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=SP_test /p:PublishProfile=SP_test.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/SP_test/Build_${env.versionNumber}/GMW.zip /p:PackageAsSingleFile=True /p:OutputPath=bin/ GMW/GMW.csproj"
bat "E:\\Jenkins\\exportDropbox.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\SP_test\" \"E:\\Staging\\byProd\\GMW\\SP_test\\GMW-site\" "
// bat "E:\\Jenkins\\exportInstaller.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\SP_test\" \"E:\\Staging\\GMW\\GMW-site\\SP_test\" "
dropbox configName: 'Mazzucconi - San Possidonio', remoteDirectory: 'File_Installazione_GMW_Test', removePrefix: 'GMW/ReleaseClienti/SP_test', sourceFiles: 'GMW/ReleaseClienti/SP_test/**'
},
PROD: {
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=SP_prod /p:PublishProfile=SP_prod.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/SP_prod/Build_${env.versionNumber}/GMW.zip /p:PackageAsSingleFile=True /p:OutputPath=bin/ GMW/GMW.csproj"
bat "E:\\Jenkins\\exportDropbox.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\SP_prod\" \"E:\\Staging\\byProd\\GMW\\SP_prod\\GMW-site\" "
// bat "E:\\Jenkins\\exportInstaller.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\SP_prod\" \"E:\\Staging\\GMW\\GMW-site\\SP_prod\" "
dropbox configName: 'Mazzucconi - San Possidonio', remoteDirectory: 'File_Installazione_GMW', removePrefix: 'GMW/ReleaseClienti/SP_prod', sourceFiles: 'GMW/ReleaseClienti/SP_prod/**'
},
failFast: false)
}
else{
echo 'Questo BRANCH non necessita di installer...'
echo 'Niente x Deploy / Install...'
}
}
}
}
// stage('Installers') {
// agent any
// steps {
// script {
// /* compilo installers in base al BRANCH del cliente... */
// if (env.BRANCH_NAME == "TK_GMW") {
// // CAMBIO numero versione in file sorgente + recupero packages
// bat "fart.exe ${WORKSPACE}\\VersGen\\GMW.cs 000.000 ${env.versionNumber} || EXIT /B 0"
// bat "e:\\nuget.exe restore ${WORKSPACE}\\GMW.sln"
// parallel (
// TEST: {
// 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=TK_test /p:PublishProfile=TK_test.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/TK_test/Build_${env.versionNumber}/GMW.zip /p:PackageAsSingleFile=True /p:OutputPath=bin/ GMW/GMW.csproj"
// bat "E:\\Jenkins\\exportDropbox.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\TK_test\" \"E:\\Staging\\byProd\\GMW\\TK_test\\GMW-site\" "
// // bat "E:\\Jenkins\\exportInstaller.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\TK_test\" \"E:\\Staging\\GMW\\GMW-site\\TK_test\" "
// dropbox configName: 'Mazzucconi - Tekal', remoteDirectory: 'File_Installazione_GMW_Test', removePrefix: 'GMW/ReleaseClienti/TK_test', sourceFiles: 'GMW/ReleaseClienti/TK_test/**'
// },
// PROD: {
// 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=TK_prod /p:PublishProfile=TK_prod.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/TK_prod/Build_${env.versionNumber}/GMW.zip /p:PackageAsSingleFile=True /p:OutputPath=bin/ GMW/GMW.csproj"
// bat "E:\\Jenkins\\exportDropbox.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\TK_prod\" \"E:\\Staging\\byProd\\GMW\\TK_prod\\GMW-site\" "
// // bat "E:\\Jenkins\\exportInstaller.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\TK_prod\" \"E:\\Staging\\GMW\\GMW-site\\TK_prod\" "
// dropbox configName: 'Mazzucconi - Tekal', remoteDirectory: 'File_Installazione_GMW', removePrefix: 'GMW/ReleaseClienti/TK_prod', sourceFiles: 'GMW/ReleaseClienti/TK_prod/**'
// },
// failFast: false)
// }
// else if (env.BRANCH_NAME == "SP_GMW") {
// // CAMBIO numero versione in file sorgente + recupero packages
// bat "fart.exe ${WORKSPACE}\\VersGen\\GMW.cs 000.000 ${env.versionNumber} || EXIT /B 0"
// bat "e:\\nuget.exe restore ${WORKSPACE}\\GMW.sln"
// parallel (
// TEST: {
// 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=SP_test /p:PublishProfile=SP_test.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/SP_test/Build_${env.versionNumber}/GMW.zip /p:PackageAsSingleFile=True /p:OutputPath=bin/ GMW/GMW.csproj"
// bat "E:\\Jenkins\\exportDropbox.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\SP_test\" \"E:\\Staging\\byProd\\GMW\\SP_test\\GMW-site\" "
// // bat "E:\\Jenkins\\exportInstaller.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\SP_test\" \"E:\\Staging\\GMW\\GMW-site\\SP_test\" "
// dropbox configName: 'Mazzucconi - San Possidonio', remoteDirectory: 'File_Installazione_GMW_Test', removePrefix: 'GMW/ReleaseClienti/SP_test', sourceFiles: 'GMW/ReleaseClienti/SP_test/**'
// },
// PROD: {
// 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=SP_prod /p:PublishProfile=SP_prod.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/SP_prod/Build_${env.versionNumber}/GMW.zip /p:PackageAsSingleFile=True /p:OutputPath=bin/ GMW/GMW.csproj"
// bat "E:\\Jenkins\\exportDropbox.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\SP_prod\" \"E:\\Staging\\byProd\\GMW\\SP_prod\\GMW-site\" "
// // bat "E:\\Jenkins\\exportInstaller.bat \"${WORKSPACE}\\GMW\\ReleaseClienti\\SP_prod\" \"E:\\Staging\\GMW\\GMW-site\\SP_prod\" "
// dropbox configName: 'Mazzucconi - San Possidonio', remoteDirectory: 'File_Installazione_GMW', removePrefix: 'GMW/ReleaseClienti/SP_prod', sourceFiles: 'GMW/ReleaseClienti/SP_prod/**'
// },
// failFast: false)
// }
// else{
// echo 'Questo BRANCH non necessita di installer...'
// }
// }
// }
// }
/*stage('Archive') {
steps {
echo 'Archiviazione build Release'