From fea8d06a12a31391c551b6f70c067b3d5ad1f266 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 15 Sep 2021 18:09:21 +0200 Subject: [PATCH] test yaml gitlab --- .gitlab-ci.yml | 55 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9aecf6ee..771c7769 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,12 @@ variables: -# NUGET_PATH: 'C:\Tools\nuget.exe' -# MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe' -# ASPNET_MERGE_PATH: 'C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools' -# EXE_RELEASE_FOLDER: 'c:\Projetcs\Compiled\GPW\Release' -# DEPLOY_FOLDER: 'c:\Projects\Deploy\GPW\Builds' -# NEW_REL: '' - VERS_MAIN: '1.0' - NEXUS_PATH: 'MP-STATS' - APP_NAME: 'MP.Stats' + NUGET_PATH: 'C:\Tools\nuget.exe' + MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe' + ASPNET_MERGE_PATH: 'C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools' + EXE_RELEASE_FOLDER: 'c:\Projetcs\Compiled\MP-CORE\Release' + DEPLOY_FOLDER: 'c:\Projects\Deploy\MP-CORE\Builds' + VERS_MAIN: '1.1' + NEXUS_PATH: 'MP-STATS' + APP_NAME: 'MP.Stats' # helper x fix pacchetti nuget da repo locale nexus.steamware.net .nuget-fix: &nuget-fix @@ -74,9 +73,11 @@ build: - win before_script: - *nuget-fix - - dotnet restore + - dotnet restore MP-STATS.sln + - dotnet restore MP-PROG.sln script: - - dotnet build + - dotnet build MP.Stats/MP.Stats.csproj + - dotnet build MP.Prog/MP.Prog.csproj test: stage: test @@ -86,7 +87,8 @@ test: - develop needs: ["build"] script: - - dotnet test + - dotnet test MP.Stats/MP.Stats.csproj + - dotnet test MP.Prog/MP.Prog.csproj IIS01:deploy: stage: deploy @@ -100,6 +102,7 @@ IIS01:deploy: # - dotnet restore script: - dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Stats/MP.Stats.csproj + - dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Prog/MP.Prog.csproj IIS02:deploy: @@ -115,8 +118,10 @@ IIS02:deploy: script: - dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Stats/MP.Stats.csproj - dotnet publish -p:PublishProfile=W2019-IIS-DEVProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Stats/MP.Stats.csproj + - dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Prog/MP.Prog.csproj + - dotnet publish -p:PublishProfile=W2019-IIS-DEVProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Prog/MP.Prog.csproj -installer: +STA:installer: stage: installer tags: - win @@ -124,6 +129,9 @@ installer: - develop - master needs: ["build"] + variables: + APP_NAME: MP-STATS + ZIP_NAME: STATS before_script: # - *nuget-fix # - dotnet restore @@ -132,6 +140,26 @@ installer: # qui il deploy su nexus... - *hashBuild - *nexusUpload + +STA:installer: + stage: installer + tags: + - win + only: + - develop + - master + needs: ["build"] + variables: + APP_NAME: MP-PROG + ZIP_NAME: PROG + before_script: + # - *nuget-fix + # - dotnet restore + script: + - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release MP.Prog/MP.Prog.csproj -o:publish + # qui il deploy su nexus... + - *hashBuild + - *nexusUpload release: stage: release @@ -149,5 +177,6 @@ release: - publish/ script: - dotnet publish -c Release -o ./publish MP.Stats/MP.Stats.csproj + - dotnet publish -c Release -o ./publish MP.Prog/MP.Prog.csproj