From d94aef991e60be5e59e60c8ef8518d2b43d90e2c Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Thu, 18 Jan 2018 18:20:00 +0100 Subject: [PATCH] aggiunta ricerca x branch OVH DEMO e PROD... --- Jenkinsfile | 66 ++++++++++++++++++++++++++--------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 607ce0f..804544b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -76,39 +76,39 @@ pipeline { } } } - // stage('RemoteDeploy') { - // agent any - // steps { - // script { - // /* compilo installers in base al BRANCH del cliente... */ - // if (env.BRANCH_NAME == "PROD-OVH") { - // /* CAMBIO numero versione in file sorgente!!! */ - // bat "e:\\fart.exe ${WORKSPACE}\\VersGen\\VersGen.cs 000.000 ${env.versionNumber} || EXIT /B 0" - // bat "e:\\nuget.exe restore ${WORKSPACE}\\MedAP.sln" - // parallel ( - // PIC: { - // 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=PROD-OVH.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:Configuration=PROD-OVH /p:username=WPROD01\\Steamware /p:Password=viaD@nte16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ MedAP/MedAP.csproj" - // }, - // failFast: false) - // } - // else if (env.BRANCH_NAME == "DEMO-OVH") { - // /* CAMBIO numero versione in file sorgente!!! */ - // bat "e:\\fart.exe ${WORKSPACE}\\VersGen\\VersGen.cs 000.000 ${env.versionNumber} || EXIT /B 0" - // bat "e:\\nuget.exe restore ${WORKSPACE}\\MedAP.sln" - // parallel ( - // PIC: { - // 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=DEMO-OVH.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:Configuration=DEMO-OVH /p:username=WPROD01\\Steamware /p:Password=viaD@nte16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ MedAP/MedAP.csproj" - // }, - // failFast: false) - // } - // else{ - // echo 'Questo BRANCH non necessita di RemoteDeploy...' - // } - // } - // } - // } + stage('RemoteDeploy') { + agent any + steps { + script { + /* compilo installers in base al BRANCH del cliente... */ + if (env.BRANCH_NAME.contains("PROD-OVH")) { + /* CAMBIO numero versione in file sorgente!!! */ + bat "e:\\fart.exe ${WORKSPACE}\\VersGen\\VersGen.cs 000.000 ${env.versionNumber} || EXIT /B 0" + bat "e:\\nuget.exe restore ${WORKSPACE}\\MedAP.sln" + parallel ( + PIC: { + 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=${env.BRANCH_NAME}.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:Configuration=${env.BRANCH_NAME} /p:username=WPROD01\\Steamware /p:Password=viaD@nte16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ MedAP/MedAP.csproj" + }, + failFast: false) + } + else if (env.BRANCH_NAME == "DEMO-OVH") { + /* CAMBIO numero versione in file sorgente!!! */ + bat "e:\\fart.exe ${WORKSPACE}\\VersGen\\VersGen.cs 000.000 ${env.versionNumber} || EXIT /B 0" + bat "e:\\nuget.exe restore ${WORKSPACE}\\MedAP.sln" + parallel ( + PIC: { + 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=DEMO-OVH.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:Configuration=DEMO-OVH /p:username=WPROD01\\Steamware /p:Password=viaD@nte16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ MedAP/MedAP.csproj" + }, + failFast: false) + } + else{ + echo 'Questo BRANCH non necessita di RemoteDeploy...' + } + } + } + } /*stage('Archive') { steps { echo 'Archiviazione build Release'