From 0996bda2deaf886c0e8a68a99dfcc28a73b063df Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 14 Oct 2019 10:45:27 +0200 Subject: [PATCH] Fix gestione nuget restore --- Jenkinsfile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 93dcc50..3fc1331 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,9 +32,13 @@ pipeline { currentBuild.description = "BUILD ${env.versionNumber}" } } - // CAMBIO numero versione + checkout NuGet in file sorgente!!! - bat "e:\\fart.exe ${WORKSPACE}\\INTERFACE\\VersGen\\VersGen.cs 0.0.0.0 ${env.versionNumber} || EXIT /B 0" - bat "e:\\nuget.exe restore ${WORKSPACE}\\INTERFACE\\WebLCP.sln" + // CAMBIO numero versione + bat "e:\\fart.exe VersGen\\VersGen.cs 0.0.0.0 ${env.versionNumber} || EXIT /B 0" + // checkout NuGet in file sorgente!!! + fixNuget("${WORKSPACE}\\INTERFACE\\WebLCP.sln") + // bat "e:\\nuget setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-group" + // bat "e:\\nuget sources Add -Name "Steamware Nexus" -Source http://nexus.steamware.net/repository/nuget-group" + // bat "e:\\nuget.exe restore ${WORKSPACE}\\INTERFACE\\WebLCP.sln" } } stage('Build') { @@ -224,3 +228,10 @@ def sendSlack(status, colorCode) { "Modifiche:\n " + getChangeString() + "\n\n Verifica build: <${env.BUILD_URL}|Apri>" + "\n" ) } + +// funzione x fix pacchetti nuget da NOSTRO repo Nexus con proxy +def fixNuget(solutionFile) { + bat "e:\\nuget setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-group" + bat "e:\\nuget sources Add -Name \"Steamware Nexus\" -Source http://nexus.steamware.net/repository/nuget-group" + bat "e:\\nuget.exe restore ${solutionFile}" +} \ No newline at end of file