From 8d4ca33861cfe0e86d3b990925b16ba2a730b069 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 6 Sep 2019 18:36:13 +0200 Subject: [PATCH] updated deploy --- Jenkinsfile | 68 +++++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index be0e5d2b..a6c091c2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -182,23 +182,6 @@ pipeline { bat "\"${tool 'MSBuild-15.0'}\" \"/p:AspnetMergePath=C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.2 Tools\" /T:Package /P:Configuration=Prod /p:PublishProfile=${env.BRANCH_NAME}.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/${env.BRANCH_NAME}/LAND.zip /p:DeployIisAppPath=\"Default Web Site/MP/LAND\" /p:PackageAsSingleFile=True /p:OutputPath=bin/ MP-LAND/MP-LAND.csproj" // pubblico su server deploy! publishToDeployServer("MP-LAND\\", "c:\\inetpub\\wwwroot\\SWS\\MAPO\\", "LAND") - - nexusArtifactUploader( - nexusVersion: 'nexus3', - protocol: 'http', - nexusUrl: 'nexus.steamware.net', - //groupId: 'SOUR', - version: "${env.versionNumber}", - repository: 'utility', - credentialsId: 'bc9d8e92-4302-3266-817f-7b58501d12d5', - artifacts: [ - [artifactId: "${packName}", - classifier: "${env.classifier}", - file: prjPath + "MP-LAND\\ReleaseClienti\\${env.BRANCH_NAME}\\LAND.zip ", - type: 'zip'] - ] - ) - // MON bat "\"${tool 'MSBuild-15.0'}\" \"/p:AspnetMergePath=C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v10.0A\\bin\\NETFX 4.6.2 Tools\" /T:Package /P:Configuration=Prod /p:PublishProfile=${env.BRANCH_NAME}.pubxml /p:VisualStudioVersion=14.0 /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/${env.BRANCH_NAME}/MON.zip /p:DeployIisAppPath=\"Default Web Site/MP/MON\" /p:PackageAsSingleFile=True /p:OutputPath=bin/ MP-MON/MP-MON.csproj" // pubblico su server deploy! @@ -223,25 +206,38 @@ pipeline { echo 'Questo BRANCH non necessita di installer...' } } - // script { - // if (env.BRANCH_NAME != "UnitTesting") { - // nexusArtifactUploader( - // nexusVersion: 'nexus3', - // protocol: 'http', - // nexusUrl: 'nexus.steamware.net', - // //groupId: 'SOUR', - // version: "${env.versionNumber}", - // repository: 'utility', - // credentialsId: 'bc9d8e92-4302-3266-817f-7b58501d12d5', - // artifacts: [ - // [artifactId: "${packName}", - // classifier: "${env.classifier}", - // file: prjPath + "MP-LAND\\ReleaseClienti\\${env.BRANCH_NAME}\\LAND.zip ", - // type: 'zip'] - // ] - // ) - // } - // } + script { + // calcolo il config... + if (env.BRANCH_NAME == "develop") { + env.config = "Debug" + env.classifier = "unstable" + } + else if (env.BRANCH_NAME == "master") { + env.config = "Release" + env.classifier = "" + } + if (env.BRANCH_NAME == "stable" || env.BRANCH_NAME.contains("beta") ) { + nexusArtifactUploader( + nexusVersion: 'nexus3', + protocol: 'http', + nexusUrl: 'nexus.steamware.net', + //groupId: 'SOUR', + version: "${env.versionNumber}", + repository: 'SWS', + credentialsId: 'bc9d8e92-4302-3266-817f-7b58501d12d5', + artifacts: [ + [artifactId: "MP-LAND", + classifier: "${env.classifier}", + file: "MP-LAND\\ReleaseClienti\\${env.BRANCH_NAME}\\LAND.zip ", + type: 'zip'] + // ,[artifactId: "MP-IO", + // classifier: "${env.classifier}", + // file: "MP-IO\\ReleaseClienti\\${env.BRANCH_NAME}\\IO.zip ", + // type: 'zip'] + ] + ) + } + } } } }