diff --git a/Jenkinsfile b/Jenkinsfile index c25532e..1f76ac9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -231,7 +231,17 @@ def sendSlack(status, colorCode) { // 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}" + // bat "e:\\nuget setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-group" + // solo la prima volta va aggiunta... + hasSource = bat "e:\\nuget sources list | find \"Steamware\" /C" + if (hasSource == "0") + { + bat "e:\\nuget sources Add -Name \"Steamware Nexus\" -Source http://nexus.steamware.net/repository/nuget-group -username \"nugetUser\" -password \"viaDante16\"" + } + else + { + bat "e:\\nuget sources Update -Name \"Steamware Nexus\" -Source http://nexus.steamware.net/repository/nuget-group -username \"nugetUser\" -password \"viaDante16\"" + } + //bat "e:\\nuget setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-group" + bat "e:\\nuget.exe restore ${solutionFile}" } \ No newline at end of file