test nuovo yaml

This commit is contained in:
Samuele Locatelli
2023-02-13 19:15:39 +01:00
parent 3d5af90a16
commit 7f70703d9f
+32 -20
View File
@@ -6,6 +6,7 @@ variables:
NEW_REL: ''
NEXUS_PATH: 'StockMan'
APP_NAME: 'StockManMVC'
SOL_NAME: 'StockManMVC'
APP_CONF: 'Release'
APP_VERS: 'unstable'
PROJ_NAME: 'StockManMVC'
@@ -90,32 +91,43 @@ stages:
- deploy
- release
StockMan:build:
StockManMVC:build:
stage: build
tags:
- win
variables:
APP_NAME: StockManMVC
SOL_NAME: StockManMVC
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore $env:APP_NAME.sln -Verbosity quiet'
- dotnet restore "$env:SOL_NAME.sln"
# - '& "$env:NUGET_PATH" restore $env:APP_NAME.sln -Verbosity quiet'
- *version-fix
script:
- '& "$env:MSBUILD_PATH" $env:APP_NAME/$env:APP_NAME.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
# - '& "$env:MSBUILD_PATH" $env:APP_NAME/$env:APP_NAME.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m'
StockMan:IIS01:deploy:
StockManMVC:IIS01:deploy:
stage: deploy
tags:
- win
variables:
APP_NAME: StockManMVC
SOL_NAME: StockManMVC
except:
refs:
- main
- master
before_script:
- *nuget-fix
- '& "$env:NUGET_PATH" restore $env:APP_NAME.sln -Verbosity quiet'
- dotnet restore "$env:SOL_NAME.sln"
# - '& "$env:NUGET_PATH" restore $env:APP_NAME.sln -Verbosity quiet'
- *version-fix
needs: ["StockManMVC:build"]
script:
- '& "$env:MSBUILD_PATH" /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal $env:APP_NAME/$env:APP_NAME.csproj'
needs: ["StockMan:build"]
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PASSWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
# - '& "$env:MSBUILD_PATH" /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal $env:APP_NAME/$env:APP_NAME.csproj'
StockMan_TK:IIS01:deploy:
stage: deploy
@@ -131,9 +143,9 @@ StockMan_TK:IIS01:deploy:
- *version-fix
script:
- '& "$env:MSBUILD_PATH" /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01_TK.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal $env:APP_NAME/$env:APP_NAME.csproj'
needs: ["StockMan:build"]
needs: ["StockManMVC:build"]
StockMan:IIS02:deploy:
StockManMVC:IIS02:deploy:
stage: deploy
tags:
- win
@@ -147,7 +159,7 @@ StockMan:IIS02:deploy:
- *version-fix
script:
- '& "$env:MSBUILD_PATH" /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS02.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal $env:APP_NAME/$env:APP_NAME.csproj'
needs: ["StockMan:build"]
needs: ["StockManMVC:build"]
StockMan_TK:IIS02:deploy:
stage: deploy
@@ -163,9 +175,9 @@ StockMan_TK:IIS02:deploy:
- *version-fix
script:
- '& "$env:MSBUILD_PATH" /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS02_TK.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal $env:APP_NAME/$env:APP_NAME.csproj'
needs: ["StockMan:build"]
needs: ["StockManMVC:build"]
StockMan:IIS03:deploy:
StockManMVC:IIS03:deploy:
stage: deploy
tags:
- win
@@ -179,7 +191,7 @@ StockMan:IIS03:deploy:
- *version-fix
script:
- '& "$env:MSBUILD_PATH" /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS03.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal $env:APP_NAME/$env:APP_NAME.csproj'
needs: ["StockMan:build"]
needs: ["StockManMVC:build"]
StockMan_TK:IIS03:deploy:
stage: deploy
@@ -195,9 +207,9 @@ StockMan_TK:IIS03:deploy:
- *version-fix
script:
- '& "$env:MSBUILD_PATH" /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS03_TK.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal $env:APP_NAME/$env:APP_NAME.csproj'
needs: ["StockMan:build"]
needs: ["StockManMVC:build"]
# StockMan:OVH:release:
# StockManMVC:OVH:release:
# stage: release
# tags:
# - win
@@ -211,9 +223,9 @@ StockMan_TK:IIS03:deploy:
# - *version-fix
# script:
# - '& "$env:MSBUILD_PATH" /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=OVH-PROD.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=steamware /p:Password=viaD@nte16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal $env:APP_NAME/$env:APP_NAME.csproj'
# needs: ["StockMan:build"]
# needs: ["StockManMVC:build"]
StockMan:Test:release:
StockManMVC:Test:release:
stage: release
tags:
- win
@@ -231,10 +243,10 @@ StockMan:Test:release:
- '& "$env:MSBUILD_PATH" /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=TK_test.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal $env:APP_NAME/$env:APP_NAME.csproj'
- *hashBuild
- *nexusUpload
needs: ["StockMan:build"]
needs: ["StockManMVC:build"]
StockMan:Prod:release:
StockManMVC:Prod:release:
stage: release
tags:
- win
@@ -252,4 +264,4 @@ StockMan:Prod:release:
- '& "$env:MSBUILD_PATH" /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=TK_prod.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal $env:APP_NAME/$env:APP_NAME.csproj'
- *hashBuild
- *nexusUpload
needs: ["StockMan:build"]
needs: ["StockManMVC:build"]