Aggiunto deploy su IIS01/02

This commit is contained in:
Samuele Locatelli
2018-03-19 15:29:15 +01:00
parent cee0a97465
commit 9509a4e938
Vendored
+27 -25
View File
@@ -9,7 +9,7 @@ pipeline {
steps {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=217']) {
withEnv(['NEXT_BUILD_NUMBER=218']) {
// env.versionNumber = VersionNumber(versionNumberString : '1.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '1.7.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'CMS-SC'
@@ -59,30 +59,32 @@ pipeline {
echo 'Testing.. 2 be done...'
}
}
// stage('Deploy') {
// agent any
// steps {
// script {
// /* DEPLOY condizionale: develop / master */
// if (env.BRANCH_NAME == "master") {
// /* CAMBIO numero versione in file sorgente!!! */
// bat "e:\\fart.exe ${WORKSPACE}\\VersGen\\VersGen.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0"
// bat "e:\\nuget.exe restore ${WORKSPACE}\\XPS_app.sln"
// parallel (
// IIS01: {
// bat "\"${tool 'MSBuild-15.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.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:Configuration=IIS01 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ XPS/CMS_SC.csproj"
// },
// IIS02: {
// bat "\"${tool 'MSBuild-15.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=IIS02.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:Configuration=IIS02 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ XPS/CMS_SC.csproj"
// },
// failFast: false)
// }
// else {
// echo 'Nothing to deploy...'
// }
// }
// }
// }
stage('Deploy') {
agent any
steps {
script {
/* DEPLOY condizionale: develop / master */
if (env.BRANCH_NAME == "master") {
/* CAMBIO numero versione in file sorgente!!! */
bat "e:\\fart.exe ${WORKSPACE}\\VersGen\\VersGen.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0"
bat "e:\\nuget.exe restore ${WORKSPACE}\\XPS_app.sln"
parallel (
IIS01: {
bat "\"${tool 'MSBuild-15.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.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ XPS/XPS.csproj"
bat "\"${tool 'MSBuild-15.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.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ XPST/XPST.csproj"
},
IIS02: {
bat "\"${tool 'MSBuild-15.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=IIS02.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ XPS/XPS.csproj"
bat "\"${tool 'MSBuild-15.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=IIS02.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ XPST/XPST.csproj"
},
failFast: false)
}
else {
echo 'Nothing to deploy...'
}
}
}
}
// stage('Installers') {
// agent any
// steps {