From f94184c832dbf4a0295a0d803c2a81e35dc28604 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 5 Feb 2020 12:00:14 +0100 Subject: [PATCH] Nuovo step x pubblicare ANCHE su nexus gli zip di IobWin --- Jenkinsfile | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c02d6638..73493fe0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ pipeline { steps { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=663']) { + withEnv(['NEXT_BUILD_NUMBER=664']) { // env.versionNumber = VersionNumber(versionNumberString : '3.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '3.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'MAPO-IOB-WIN' @@ -77,19 +77,11 @@ pipeline { // a seconda del branch decido cosa e come compilare e caricare... script { if(env.BRANCH_NAME == "IobMan") { - // // CAMBIO numero versione in file sorgente!!! - // bat "e:\\fart.exe VersGen\\VersGen.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0" - // // checkout NuGet in file sorgente!!! - // fixNuget("${WORKSPACE}\\IOB-WIN.sln") // BUILD! bat "\"${tool 'MSBuild-16.0'}\" IOB-MAN/IOB-MAN.csproj -target:Build /p:Configuration=Release /p:Platform=\"x86\" /p:OutputPath=bin/ /m" } // procedo solo se NON si tratta di commit in ramo DOCUMentazione... else if (env.BRANCH_NAME == "develop" || env.BRANCH_NAME.contains("master") ) { - // // CAMBIO numero versione in file sorgente!!! - // bat "e:\\fart.exe VersGen\\VersGen.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0" - // // checkout NuGet in file sorgente!!! - // fixNuget("${WORKSPACE}\\IOB-WIN.sln") // BUILD! bat "\"${tool 'MSBuild-16.0'}\" IOB-WIN/IOB-WIN.csproj -target:Build /p:Configuration=Release /p:Platform=\"x86\" /p:OutputPath=bin/ /m" } @@ -156,6 +148,33 @@ pipeline { bat "xcopy /y Releases\\${env.BRANCH_NAME}\\MAPO-IOB-WIN.zip E:\\Staging\\byProd\\MP\\${env.BRANCH_NAME}\\IOB-WIN\\${env.versionNumber}\\ " // copio in area WebDeploy bat "xcopy /y Releases\\${env.BRANCH_NAME}\\MAPO-IOB-WIN.zip c:\\inetpub\\wwwroot\\SWS\\MAPO\\IOB-WIN\\${env.BRANCH_NAME}\\ " + + // fix classificazione x develop/master... + if (env.BRANCH_NAME == "develop") + { + env.classifier = "unstable" + } + else + { + env.classifier = "" + } + // ora mi occupo delle operazioni di invio a NEXUS... + nexusArtifactUploader( + nexusVersion: 'nexus3', + protocol: 'http', + nexusUrl: 'nexus.steamware.net', + groupId: 'MAPO', + //version: "${env.versionNumber}", + version: "stable", + repository: 'utility', + credentialsId: 'bc9d8e92-4302-3266-817f-7b58501d12d5', + artifacts: [ + [artifactId: 'IOB-WIN', + classifier: "${env.classifier}", + file: "Releases\\${env.BRANCH_NAME}\\MAPO-IOB-WIN.zip", + type: 'zip'] + ] + ) } else {