From e5a611c8446faedcd88ecef006891a82bf37741a Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 21 Sep 2021 18:06:51 +0200 Subject: [PATCH] Separato anche build e test --- .gitlab-ci.yml | 70 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 46 insertions(+), 24 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aa090936..9f349ab4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -69,40 +69,65 @@ stages: - installer - release -build: +LAND:build: + stage: build + tags: + - win + before_script: + - *nuget-fix + - dotnet restore MP-LAND.sln + script: + - dotnet build MP.Land/MP.Land.csproj + +PROG:build: + stage: build + tags: + - win + before_script: + - *nuget-fix + - dotnet restore MP-PROG.sln + script: + - dotnet build MP.Prog/MP.Prog.csproj + +STAT:build: stage: build tags: - win before_script: - *nuget-fix - dotnet restore MP-STATS.sln - - dotnet restore MP-PROG.sln script: - dotnet build MP.Stats/MP.Stats.csproj - - dotnet build MP.Prog/MP.Prog.csproj -test: +LAND:test: stage: test tags: - win # only: # - develop - needs: ["build"] + needs: ["LAND:build"] + script: + - dotnet test MP.Land/MP.Land.csproj + +PROG:test: + stage: test + tags: + - win + # only: + # - develop + needs: ["PROG:build"] + script: + - dotnet test MP.Prog/MP.Prog.csproj + +STAT:test: + stage: test + tags: + - win + # only: + # - develop + needs: ["STAT:build"] script: - dotnet test MP.Stats/MP.Stats.csproj - - dotnet test MP.Prog/MP.Prog.csproj - -# IIS01:deploy: -# stage: deploy -# tags: -# - win -# # only: -# # - develop -# needs: ["test"] -# script: -# - dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Land/MP.Land.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 -# - 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 LAND:IIS01:deploy: stage: deploy @@ -110,7 +135,7 @@ LAND:IIS01:deploy: - win # only: # - develop - needs: ["test"] + needs: ["LAND:test"] script: - dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Land/MP.Land.csproj @@ -120,7 +145,7 @@ PROG:IIS01:deploy: - win # only: # - develop - needs: ["test"] + needs: ["PROG:test"] script: - 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 @@ -131,13 +156,10 @@ STAT:IIS01:deploy: - win # only: # - develop - needs: ["test"] + needs: ["STAT:test"] 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 - - - IIS02:deploy: stage: deploy tags: