Tolto before script e test per fix nuget

This commit is contained in:
gitlab
2021-03-26 09:42:19 +00:00
parent 82983f10d8
commit 551d79b21a
+13 -4
View File
@@ -1,19 +1,28 @@
variables:
NUGET_PATH: 'C:\Tools\nuget.exe'
MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe'
hasSource: '& "$env:NUGET_PATH" sources list | find "`"Steamware Nexus`"" /C'
stages:
- build
- deploy
before_script:
- '& "$env:NUGET_PATH" restore LPA.sln' # sourcecode\project.sln-This path includes project solution where is available and restoring - modifica locale per test restore
build_job:
stage: build
script:
- '& "\$env:MSBUILD_PATH" LPA/LPA.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/'
- |-
if ($env:hasSource == "0")
{
'& "$env:NUGET_PATH" sources Add -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`""'
}
else
{
'& "$env:NUGET_PATH" sources Update -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`""'
}
- '& "$env:NUGET_PATH" restore LPA.sln'
- '& "\$env:MSBUILD_PATH" LPA/LPA.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/'
artifacts:
expire_in: 365 days #artifcats will be stored only 365 days after this it will expire