From 3cfc979fe940c5f39020da631602242a0b483b48 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Thu, 31 Dec 2020 13:34:25 +0100 Subject: [PATCH 1/3] typo fix jenkinsfile --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7a62cf17..52aef002 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -64,9 +64,9 @@ pipeline { }, failFast: false) } - else if (env.singleProj.contains(env.BRANCH_NAME) { + else if ( env.singleProj.contains(env.BRANCH_NAME) ) { parallel ( - ALL: { + SINGLE: { bat "\"${tool 'MSBuild-16.0'}\" /p:m=8 MP-${env.BRANCH_NAME}/MP-${env.BRANCH_NAME}.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /m" }, failFast: false) From 3e71e13d16bc65caf3e5690a5bbd622fc1fc31d5 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Thu, 31 Dec 2020 13:40:31 +0100 Subject: [PATCH 2/3] fix typo variabili ENV x Jenkins --- Jenkinsfile | 2 +- gitSpread.bat | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 52aef002..76b3bbc2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,7 +5,7 @@ pipeline { EMAIL_RECIPIENTS = 'samuele@steamware.net' enableIIS01 = 'Y' enableIIS02 = 'Y' - singleProj = ['ADM','IO','LAND','MAG','MON','SITE','TAB'] + singleProj ='ADM,IO,LAND,MAG,MON,SITE,TAB' } stages { stage('Checkout') { diff --git a/gitSpread.bat b/gitSpread.bat index 96c93fc9..6b0a200f 100644 --- a/gitSpread.bat +++ b/gitSpread.bat @@ -12,12 +12,13 @@ set pushRemote=%2 git push . %baseBranch%:beta git push . %baseBranch%:develop +git push gitlab.steamware %baseBranch%:%baseBranch% REM Faccio push remoto condizionale if %pushRemote% GTR 0 ( git push . %baseBranch%:ES3 ) if %pushRemote% GTR 0 ( git push . %baseBranch%:Giancarlo ) if %pushRemote% GTR 0 ( git push . %baseBranch%:MongoDb ) -if %pushRemote% GTR 0 ( git push gitlab.steamware %baseBranch%:%baseBranch% ) +REM if %pushRemote% GTR 0 ( git push gitlab.steamware %baseBranch%:%baseBranch% ) if %pushRemote% GTR 0 ( git push gitlab.steamware %baseBranch%:beta ) if %pushRemote% GTR 0 ( git push gitlab.steamware %baseBranch%:develop ) From 013d2499dedbf56ed3e36c23a0d393c6b5067809 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Thu, 31 Dec 2020 13:43:34 +0100 Subject: [PATCH 3/3] Fix gitSpread + install IIS01 single branch push --- Jenkinsfile | 14 +++++++------- gitSpread.bat | 1 - 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 76b3bbc2..af852502 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -165,13 +165,13 @@ pipeline { bat "e:\\nuget setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted" bat "e:\\nuget.exe push MapoSDK.${env.packVers}.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted" } - // else if (env.singleProj.contains(env.BRANCH_NAME) { - // parallel ( - // ALL: { - // bat "\"${tool 'MSBuild-16.0'}\" \"/p:m=8 /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:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ MP-${env.BRANCH_NAME}/MP-${env.BRANCH_NAME}.csproj" - // }, - // failFast: false) - // } + else if ( env.singleProj.contains(env.BRANCH_NAME) ) { + parallel ( + ALL: { + bat "\"${tool 'MSBuild-16.0'}\" \"/p:m=8 /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:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ MP-${env.BRANCH_NAME}/MP-${env.BRANCH_NAME}.csproj" + }, + failFast: false) + } else { echo 'Nothing to deploy...' } diff --git a/gitSpread.bat b/gitSpread.bat index 6b0a200f..0a60feb5 100644 --- a/gitSpread.bat +++ b/gitSpread.bat @@ -18,7 +18,6 @@ REM Faccio push remoto condizionale if %pushRemote% GTR 0 ( git push . %baseBranch%:ES3 ) if %pushRemote% GTR 0 ( git push . %baseBranch%:Giancarlo ) if %pushRemote% GTR 0 ( git push . %baseBranch%:MongoDb ) -REM if %pushRemote% GTR 0 ( git push gitlab.steamware %baseBranch%:%baseBranch% ) if %pushRemote% GTR 0 ( git push gitlab.steamware %baseBranch%:beta ) if %pushRemote% GTR 0 ( git push gitlab.steamware %baseBranch%:develop )