From cc6659b0a86d01064a3e0137acd42e3d102a1373 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 26 May 2021 20:42:34 +0200 Subject: [PATCH] aggiunta steps installaizone --- .gitlab-ci.yml | 112 +++++++++---------------------------------------- 1 file changed, 20 insertions(+), 92 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5731f348..591fdf87 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,9 +23,9 @@ stages: - build - test - staging -# - deploy + - deploy - release -# - installer + - installer build: stage: build @@ -43,19 +43,29 @@ test: script: - dotnet test +staging: + stage: staging + only: + - develop + needs: ["build"] + # before_script: + # - *nuget-fix + # - 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 staging: - stage: staging - # only: - # - develop + stage: deploy + only: + - master needs: ["build"] - before_script: - - *nuget-fix - - dotnet restore + # before_script: + # - *nuget-fix + # - 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:PublishReadyToRun=true -p:m=8 -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true -p:OutputPath=bin/ 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.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 release: stage: release @@ -71,71 +81,6 @@ release: - -# BHS:staging: -# stage: staging -# rules: -# - if: '$CI_COMMIT_BRANCH == "develop"' -# before_script: -# - *nuget-fix -# - '& "$env:NUGET_PATH" restore GPW.sln' -# - *version-fix -# script: -# - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS01 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Barcode/GPW_Barcode.csproj' -# - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS01 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal HOME/HOME.csproj' -# - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS01 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Smart/GPW_Smart.csproj' -# needs: ["BHS:build"] - - -# AC:deploy: -# stage: deploy -# rules: -# - if: '$CI_COMMIT_BRANCH == "master"' -# before_script: -# - *nuget-fix -# - '& "$env:NUGET_PATH" restore GPW.sln' -# - *version-fix -# script: -# # ----ADMIN ---- -# # IIS 02 -# - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS02.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS02 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Admin/GPW_Admin.csproj' -# # IIS DEV -# - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IISDEV.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS02 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Admin/GPW_Admin.csproj' -# # ----Commesse ---- -# # IIS 02 -# - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS02.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS02 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Commesse/GPW_Commesse.csproj' -# # IIS DEV -# - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IISDEV.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS02 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Commesse/GPW_Commesse.csproj' -# needs: ["AC:build"] -# # when: -# # manual - -# BHS:deploy: -# stage: deploy -# rules: -# - if: '$CI_COMMIT_BRANCH == "master"' -# before_script: -# - *nuget-fix -# - '& "$env:NUGET_PATH" restore GPW.sln' -# - *version-fix -# script: -# # ----BCode ---- -# # IIS 02 -# - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS02.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS02 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Barcode/GPW_Barcode.csproj' -# # IIS DEV -# - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IISDEV.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS02 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Barcode/GPW_Barcode.csproj' -# # ---- HOME ---- -# # IIS 02 -# - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS02.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS02 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal HOME/HOME.csproj' -# # IIS DEV -# - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IISDEV.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS02 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal HOME/HOME.csproj' -# # ---- SMART ---- -# # IIS 02 -# - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS02.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS02 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Smart/GPW_Smart.csproj' -# # IIS DEV -# - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IISDEV.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS02 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Smart/GPW_Smart.csproj' -# needs: ["BHS:build"] - # AC:install: # stage: installer # rules: @@ -155,20 +100,3 @@ release: # needs: ["AC:build"] -# BHS:install: -# stage: installer -# rules: -# - if: '$CI_COMMIT_BRANCH == "master"' -# when: manual -# before_script: -# - *nuget-fix -# - '& "$env:NUGET_PATH" restore GPW.sln' -# - *version-fix -# script: -# # BCode ZIP package -# - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /T:Package /P:Configuration=SPS /p:PublishProfile=SPS.pubxml /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/SPS_PROD/$env:NEW_REL/GPW_Barcode.zip /p:DeployIisAppPath="Default Web Site/GPW/ADMIN" /p:PackageAsSingleFile=True /p:OutputPath=bin/ GPW_Barcode/GPW_Barcode.csproj' -# # HOME ZIP package -# - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /T:Package /P:Configuration=SPS /p:PublishProfile=SPS.pubxml /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/SPS_PROD/$env:NEW_REL/HOME.zip /p:DeployIisAppPath="Default Web Site/GPW/ADMIN" /p:PackageAsSingleFile=True /p:OutputPath=bin/ HOME/HOME.csproj' -# # ZIP package -# - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /T:Package /P:Configuration=SPS /p:PublishProfile=SPS.pubxml /p:RunCodeAnalysis=false /p:PackageLocation=ReleaseClienti/SPS_PROD/$env:NEW_REL/GPW_Smart.zip /p:DeployIisAppPath="Default Web Site/GPW/ADMIN" /p:PackageAsSingleFile=True /p:OutputPath=bin/ GPW_Smart/GPW_Smart.csproj' -# needs: ["BHS:build"]