From 7bdb9dd820be388000fa4a33bfbf29e5ae1c6ed7 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Thu, 10 Oct 2019 09:47:46 +0200 Subject: [PATCH] update script upload con nuget push --- Jenkinsfile | 52 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ed3d828..70930f8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -86,6 +86,8 @@ pipeline { bat "\"${tool 'MSBuild-16.0'}\" MConnectSDK/MConnectSDK.csproj -target:Build /p:Configuration=${env.config} /p:Platform=\"x86\" /p:OutputPath=bin/${env.config} /m" // creo package NuGet... bat "e:\\nuget.exe pack ${WORKSPACE}\\MConnectSDK\\MConnectSDK.csproj -properties Configuration=${env.config}" + + } else { @@ -95,28 +97,38 @@ pipeline { // ora mi occupo delle operazioni di invio a NEXUS... script { if (env.BRANCH_NAME == "develop") { - echo 'Try upload' - nexusArtifactUploader( - artifacts: [ - [ - artifactId: 'MConnectSDK', - classifier: "${env.classifier}", - file: "MConnectSDK.${env.versionNumber}.nupkg", - type: 'nupkg' - ] - ], - credentialsId: 'bc9d8e92-4302-3266-817f-7b58501d12d5', - groupId: '', - nexusUrl: 'nexus.steamware.net', - nexusVersion: 'nexus3', - protocol: 'http', - repository: 'nuget-hosted', - version: "${env.versionNumber}" - ) - echo 'End try upload' + // echo 'Try upload' + // nexusArtifactUploader( + // artifacts: [ + // [ + // artifactId: 'MConnectSDK', + // classifier: "${env.classifier}", + // file: "MConnectSDK.${env.versionNumber}.nupkg", + // type: 'nupkg' + // ] + // ], + // credentialsId: 'bc9d8e92-4302-3266-817f-7b58501d12d5', + // groupId: '', + // nexusUrl: 'nexus.steamware.net', + // nexusVersion: 'nexus3', + // protocol: 'http', + // repository: 'nuget-hosted', + // version: "${env.versionNumber}" + // ) + // echo 'End try upload' + // lancio upload con nuget! + echo 'Start upload with nuget push' + bat "e:\nuget setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted" + bat "e:\\nuget.exe push MConnectSDK.${env.versionNumber}.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted" + // bat "e:\\nuget.exe push MConnectSDK.${env.versionNumber}.nupkg fe387daa-d07c-3207-877e-96c8be1be91ba -Source http://nexus.steamware.net/repository/nuget-hosted" } else if (env.BRANCH_NAME == "master") { - echo 'No upload' + // lancio upload con nuget! + echo 'Start upload with nuget push' + bat "e:\nuget setapikey 065e6ea1-db11-3ded-a77e-be1a689c8d1a -source https://repository.scmgroup.com/repository/mconnect-nuget/" + bat "e:\\nuget.exe push MConnectSDK.${env.versionNumber}.nupkg -Source https://repository.scmgroup.com/repository/mconnect-nuget" + // bat "e:\\nuget.exe push MConnectSDK.${env.versionNumber}.nupkg 065e6ea1-db11-3ded-a77e-be1a689c8d1a -Source https://repository.scmgroup.com/repository/mconnect-nuget" + // nexusArtifactUploader( // nexusVersion: 'nexus3', // protocol: 'https',