From 254c443d267716273db11b76457573a37646477c Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 18 Feb 2020 16:28:44 +0100 Subject: [PATCH] Update procedura x pubblicazione stable... --- Jenkinsfile | 58 ++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 35f461c..a922f7c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,7 +12,7 @@ pipeline { steps { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=76']) { + withEnv(['NEXT_BUILD_NUMBER=77']) { // env.versionNumber = VersionNumber(versionNumberString : '1.2.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '1.2.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'ZCode' @@ -58,6 +58,33 @@ pipeline { } } } + stage('Deploy') { + agent any + steps { + script { + // CAMBIO numero versione + checkout NuGet in file sorgente!!! + bat "e:\\fart.exe ${WORKSPACE}\\VersGen\\VersGen.cs 0.0.0.0 ${env.versionNumber} || EXIT /B 0" + fixNuget("${WORKSPACE}\\ZebraCode.sln") + } + script { + /* DEPLOY condizionale: develop (Ufficio Seriate) / master (Sito Online) */ + if (env.BRANCH_NAME == "master") { + if(env.enableIIS01 == "Y") + { + // SITE + 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=15.0 /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ ZCode\\ZCode.csproj" + } + } + else if (env.BRANCH_NAME == "ovh") { + 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=OVH-PROD.pubxml /p:VisualStudioVersion=15.0 /p:RunCodeAnalysis=false /p:Configuration=OVH /p:username=WPROD01\\Steamware /p:Password=viaD@nte16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ ZCode\\ZCode.csproj" + } + else + { + echo 'Questo BRANCH non necessita di deploy...' + } + } + } + } stage('Installers') { agent any steps { @@ -91,7 +118,7 @@ pipeline { [ artifactId: 'ZCode', classifier: "${env.classifier}", - file: "ReleaseClienti\\${env.BRANCH_NAME}\\ZCode.zip", + file: "ZCode\\ReleaseClienti\\${env.BRANCH_NAME}\\ZCode.zip", type: 'zip' ] ], @@ -110,33 +137,6 @@ pipeline { } } } - stage('Deploy') { - agent any - steps { - script { - // CAMBIO numero versione + checkout NuGet in file sorgente!!! - bat "e:\\fart.exe ${WORKSPACE}\\VersGen\\VersGen.cs 0.0.0.0 ${env.versionNumber} || EXIT /B 0" - fixNuget("${WORKSPACE}\\ZebraCode.sln") - } - script { - /* DEPLOY condizionale: develop (Ufficio Seriate) / master (Sito Online) */ - if (env.BRANCH_NAME == "master") { - if(env.enableIIS01 == "Y") - { - // SITE - 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=15.0 /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ ZCode\\ZCode.csproj" - } - } - else if (env.BRANCH_NAME == "ovh") { - 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=OVH-PROD.pubxml /p:VisualStudioVersion=15.0 /p:RunCodeAnalysis=false /p:Configuration=OVH /p:username=WPROD01\\Steamware /p:Password=viaD@nte16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ ZCode\\ZCode.csproj" - } - else - { - echo 'Questo BRANCH non necessita di deploy...' - } - } - } - } } post { success {