From 7187a0b7ffa991d4eadabd273be85899bbd13b9f Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 14 Mar 2023 15:38:29 +0100 Subject: [PATCH 1/2] fix pubxml x deploy GPS SMART (classic) fix CI-CD x gestione branch --- .gitlab-ci.yml | 65 ++++++++++++++++++++------------------------------ 1 file changed, 26 insertions(+), 39 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2ed742e..c923a71 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,9 +19,9 @@ variables: - | $hasSource = C:\Tools\nuget.exe sources list | find "`"Steamware Nexus`"" /C if ($hasSource -eq 0) { - C:\Tools\nuget.exe sources Add -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`"" + C:\Tools\nuget.exe sources Add -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"$NEXUS_PASSWD`"" } else { - C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`"" + C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"$NEXUS_PASSWD`"" } echo $hasSource @@ -91,8 +91,8 @@ ADM:staging: stage: staging tags: - win - rules: - - if: '$CI_COMMIT_BRANCH == "develop"' + only: + - develop before_script: - *nuget-fix - '& "$env:NUGET_PATH" restore GPW.sln -verbosity quiet' @@ -105,8 +105,8 @@ COM:staging: stage: staging tags: - win - rules: - - if: '$CI_COMMIT_BRANCH == "develop"' + only: + - develop before_script: - *nuget-fix - '& "$env:NUGET_PATH" restore GPW.sln -verbosity quiet' @@ -119,8 +119,8 @@ BH:staging: stage: staging tags: - win - rules: - - if: '$CI_COMMIT_BRANCH == "develop"' + only: + - develop before_script: - *nuget-fix - '& "$env:NUGET_PATH" restore GPW.sln -verbosity quiet' @@ -134,8 +134,8 @@ Smart:staging: stage: staging tags: - win - rules: - - if: '$CI_COMMIT_BRANCH == "develop"' + only: + - develop before_script: - *nuget-fix - '& "$env:NUGET_PATH" restore GPW.sln -verbosity quiet' @@ -156,8 +156,6 @@ ADM:deploy: - '& "$env:NUGET_PATH" restore GPW.sln -verbosity quiet' - *version-fix script: - # # 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=Release /p:username=jenkins /p:Password=$IIS_PWD /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Admin/GPW_Admin.csproj' # IIS PROD - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS-PROD.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=$IIS_PWD /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Admin/GPW_Admin.csproj' needs: ["ADM:build"] @@ -173,8 +171,6 @@ COM:deploy: - '& "$env:NUGET_PATH" restore GPW.sln -verbosity quiet' - *version-fix script: - # # 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=Release /p:username=jenkins /p:Password=$IIS_PWD /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Commesse/GPW_Commesse.csproj' # IIS PROD - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS-PROD.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=$IIS_PWD /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Commesse/GPW_Commesse.csproj' needs: ["COM:build"] @@ -183,21 +179,17 @@ BH:deploy: stage: deploy tags: - win - rules: - - if: '$CI_COMMIT_BRANCH == "master"' + only: + - master +# rules: +# - if: '$CI_COMMIT_BRANCH == "master"' before_script: - *nuget-fix - '& "$env:NUGET_PATH" restore GPW.sln -verbosity quiet' - *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=Release /p:username=jenkins /p:Password=$IIS_PWD /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Barcode/GPW_Barcode.csproj' + script: # IIS PROD - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS-PROD.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=$IIS_PWD /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=Release /p:username=jenkins /p:Password=$IIS_PWD /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal HOME/HOME.csproj' # IIS PROD - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS-PROD.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=$IIS_PWD /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal HOME/HOME.csproj' needs: ["BH:build"] @@ -206,16 +198,13 @@ Smart:deploy: stage: deploy tags: - win - rules: - - if: '$CI_COMMIT_BRANCH == "master"' + only: + - master before_script: - *nuget-fix - '& "$env:NUGET_PATH" restore GPW.sln -verbosity quiet' - *version-fix - script: - # ---- 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=Release /p:username=jenkins /p:Password=$IIS_PWD /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Smart/GPW_Smart.csproj' + script: # IIS PROD - '& "$env:MSBUILD_PATH" /p:m=8 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS-PROD.pubxml /p:RunCodeAnalysis=false /p:Configuration=Release /p:username=jenkins /p:Password=$IIS_PWD /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ /verbosity:minimal GPW_Smart/GPW_Smart.csproj' needs: ["Smart:build"] @@ -225,8 +214,8 @@ ADM:install: stage: installer tags: - win - rules: - - if: '$CI_COMMIT_BRANCH == "master"' + only: + - master before_script: - *nuget-fix - '& "$env:NUGET_PATH" restore GPW.sln -verbosity quiet' @@ -240,8 +229,8 @@ COM:install: stage: installer tags: - win - rules: - - if: '$CI_COMMIT_BRANCH == "master"' + only: + - master before_script: - *nuget-fix - '& "$env:NUGET_PATH" restore GPW.sln -verbosity quiet' @@ -255,9 +244,8 @@ BH:install: stage: installer tags: - win - rules: - - if: '$CI_COMMIT_BRANCH == "master"' - # when: manual + only: + - master before_script: - *nuget-fix - '& "$env:NUGET_PATH" restore GPW.sln -verbosity quiet' @@ -273,9 +261,8 @@ Smart:install: stage: installer tags: - win - rules: - - if: '$CI_COMMIT_BRANCH == "master"' - # when: manual + only: + - master before_script: - *nuget-fix - '& "$env:NUGET_PATH" restore GPW.sln -verbosity quiet' From 17bb5f2ec7781133a9e2ddc99d501ea00b458e4d Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 14 Mar 2023 15:38:34 +0100 Subject: [PATCH 2/2] update pubxml --- GPW_Smart/Properties/PublishProfiles/IIS-PROD.pubxml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPW_Smart/Properties/PublishProfiles/IIS-PROD.pubxml b/GPW_Smart/Properties/PublishProfiles/IIS-PROD.pubxml index 4befdc6..e6b985c 100644 --- a/GPW_Smart/Properties/PublishProfiles/IIS-PROD.pubxml +++ b/GPW_Smart/Properties/PublishProfiles/IIS-PROD.pubxml @@ -7,7 +7,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt MSDeploy seriate.egalware.com/GPW/SMART - https://seriate.egalware.com:8172/MsDeploy.axd + https://office.egalware.com:8172/MsDeploy.axd seriate.egalware.com/GPW/SMART false