From 5eb9192a417ce74dec980df05881f56b46373e57 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 25 May 2021 13:05:46 +0200 Subject: [PATCH 01/26] update deploy script --- AppDeploy.ps1 | 49 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/AppDeploy.ps1 b/AppDeploy.ps1 index b7b16fde..871b4322 100644 --- a/AppDeploy.ps1 +++ b/AppDeploy.ps1 @@ -1,7 +1,7 @@ #------------------------------------------------------------------- # Egalware 2021.05.25 # -# AppDeploy -AppPool MP.STATS -SourceDir c:\Steamware\installers\MP.STATS -ZipFile MP.STATS.zip -DestDir c:\inetpub\wwwroot\MP\STATS +# .\AppDeploy.ps1 -AppPool MP.STATS -SourceDir c:\Steamware\installers\MP\STATS -ZipFile MP.STATS.zip -DestDir c:\inetpub\wwwroot\MP\STATS2 # # Powershell script per deploy applicazione Blazor / dotnet core # @@ -29,6 +29,13 @@ param ( [string]$DestDir ) +# conf x logging +$logDir = "c:\Steamware\tmp" +$logFile = "$logDir\Script.log" +$logMirror = "$logDir\Mirror.log" +$utilDir = "c:\Steamware\tmp" +$installDir = "c:\Steamware\installers\" + # recupera timestamp x logging function Get-TimeStamp { @@ -37,14 +44,14 @@ function Get-TimeStamp # registra log! function DoLog($txt2log) { - Write-Output "$(Get-TimeStamp) $txt2log" | Out-File $filelog -Append + Write-Output "$(Get-TimeStamp) $txt2log" | Out-File $logFile -Append } # esegue e registra log function ExecuteLog($txt2log) { - Write-Output "-------------------------------------------------------------------------------------------------------------------------------------------------" | Out-File -FilePath "$filelog" -Append - Write-Output "$(Get-TimeStamp) $txt2log" | Out-File -FilePath "$filelog" -Append - Invoke-Expression "$txt2log 2>&1 | Out-File -FilePath $filelog -Append" + Write-Output "-------------------------------------------------------------------------------------------------------------------------------------------------" | Out-File -FilePath "$logFile" -Append + Write-Output "$(Get-TimeStamp) $txt2log" | Out-File -FilePath "$logFile" -Append + Invoke-Expression "$txt2log 2>&1 | Out-File -FilePath $logFile -Append" if( $LASTEXITCODE -ne 0) { Write-Host "Error during cmmand: $txt2log" -ForegroundColor Red ; @@ -53,27 +60,41 @@ function ExecuteLog($txt2log) exit } } -# conf x logging -$filelog = "c:\Steamware\tmp\Script.log" -$utilDir = "c:\Steamware\tmp\" -Write-Output "-------------------------------- START script --------------------------------" | Out-File $filelog +# fix cartelle... +If (!(test-path $logFile)) +{ + New-Item -ItemType Directory -Force -Path $logDir + New-Item -ItemType File -Force -Path $logFile + New-Item -ItemType File -Force -Path $logMirror +} + +Write-Output "-------------------------------- START script --------------------------------" | Out-File $logFile $StopWatch = New-Object System.Diagnostics.Stopwatch $StopWatch.Start() # step 1 : stop del pool applicazioni IIS -Write-Host "Stop AppPool" -ExecuteLog "Stop-WebAppPool -Name '$AppPool'" +$currState = Get-WebAppPoolState -Name $AppPool +if($currState.value -eq "Started") +{ + Write-Host "Stop AppPool" + ExecuteLog "Stop-WebAppPool -Name '$AppPool'" +} -# step 2 : unzip -ExecuteLog "Expand-7Zip -ArchiveFileName '$SourceDir\$ZipFile' -TargetPath '$utilDir'" +# step 2 : cambio dir + unzip +Write-Host "Unzip" +cd $utilDir +ExecuteLog "7z x ""$SourceDir\$ZipFile"" " # step 3 : replica applicazione Write-Host "START copy step" -ExecuteLog "robocopy '$utilDir\publish\net5.0\' '$DestDir' /MIR /Z /LOG:C:\tmp\ViewMirror.log /XF logs/*.txt logs/*.log" +ExecuteLog "robocopy '$utilDir\publish\net5.0\' '$DestDir' /MIR /Z /LOG:'$logMirror'" Write-Host "END copy step" # step 4 : riavvio pool Write-Host "Start AppPool" ExecuteLog "Start-WebAppPool -Name '$AppPool'" + +# step 5 : fix dir originale +cd $installDir \ No newline at end of file From e32bcca1ce3ecdd99b37e74296b3892423ea8025 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 25 May 2021 16:41:42 +0200 Subject: [PATCH 02/26] Aggiunta profili compilazione --- .../PublishProfiles/FolderProfile.pubxml | 16 ++++++++++++++ .../PublishProfiles/FolderProfile.pubxml.user | 10 +++++++++ .../PublishProfiles/IIS01.pubxml.user | 12 +++++++++++ .../PublishProfiles/IIS02.pubxml.user | 11 ++++++++++ .../PublishProfiles/IISProfile.pubxml | 21 +++++++++++++++++++ .../PublishProfiles/IISProfile.pubxml.user | 11 ++++++++++ .../W2019-IIS-DEVProfile.pubxml.user | 12 +++++++++++ 7 files changed, 93 insertions(+) create mode 100644 MP.Stats/Properties/PublishProfiles/FolderProfile.pubxml create mode 100644 MP.Stats/Properties/PublishProfiles/FolderProfile.pubxml.user create mode 100644 MP.Stats/Properties/PublishProfiles/IIS01.pubxml.user create mode 100644 MP.Stats/Properties/PublishProfiles/IIS02.pubxml.user create mode 100644 MP.Stats/Properties/PublishProfiles/IISProfile.pubxml create mode 100644 MP.Stats/Properties/PublishProfiles/IISProfile.pubxml.user create mode 100644 MP.Stats/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml.user diff --git a/MP.Stats/Properties/PublishProfiles/FolderProfile.pubxml b/MP.Stats/Properties/PublishProfiles/FolderProfile.pubxml new file mode 100644 index 00000000..cb2062ae --- /dev/null +++ b/MP.Stats/Properties/PublishProfiles/FolderProfile.pubxml @@ -0,0 +1,16 @@ + + + + + False + False + True + Release + Any CPU + FileSystem + bin\publish\net5.0\ + FileSystem + + \ No newline at end of file diff --git a/MP.Stats/Properties/PublishProfiles/FolderProfile.pubxml.user b/MP.Stats/Properties/PublishProfiles/FolderProfile.pubxml.user new file mode 100644 index 00000000..a8c8c11f --- /dev/null +++ b/MP.Stats/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -0,0 +1,10 @@ + + + + + <_PublishTargetUrl>C:\Users\samuele\source\repos\MAPO-CORE\MP.Stats\bin\publish\net5.0\ + True|2021-05-25T06:38:44.6280246Z; + + \ No newline at end of file diff --git a/MP.Stats/Properties/PublishProfiles/IIS01.pubxml.user b/MP.Stats/Properties/PublishProfiles/IIS01.pubxml.user new file mode 100644 index 00000000..7c96d8bb --- /dev/null +++ b/MP.Stats/Properties/PublishProfiles/IIS01.pubxml.user @@ -0,0 +1,12 @@ + + + + + + AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA+11nhJeDSkeTlSej+COD3AAAAAACAAAAAAADZgAAwAAAABAAAACFCXZ0UR7Czo59aaRCHU5QAAAAAASAAACgAAAAEAAAACYlKt9E6s77uEikpKwyhdQYAAAAUwae989LovFbsfjRp69HCVpyUQZbqLyYFAAAAMW8mLSAxWmKaOvB4nkDgUpS27/b + True|2021-05-25T14:26:34.1426996Z;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00; + + \ No newline at end of file diff --git a/MP.Stats/Properties/PublishProfiles/IIS02.pubxml.user b/MP.Stats/Properties/PublishProfiles/IIS02.pubxml.user new file mode 100644 index 00000000..8d468c51 --- /dev/null +++ b/MP.Stats/Properties/PublishProfiles/IIS02.pubxml.user @@ -0,0 +1,11 @@ + + + + + + AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA+11nhJeDSkeTlSej+COD3AAAAAACAAAAAAADZgAAwAAAABAAAAB3zVMW24A4himhWJ5CNqgeAAAAAASAAACgAAAAEAAAAA7IL1n8zHn2/ljDNL4/zlsYAAAAgAEg9RYKHV0xl3wnafZiN9Q954GOBAvdFAAAACSBJkwDndNTiIrUuk7zJls84fN1 + + \ No newline at end of file diff --git a/MP.Stats/Properties/PublishProfiles/IISProfile.pubxml b/MP.Stats/Properties/PublishProfiles/IISProfile.pubxml new file mode 100644 index 00000000..7159a5db --- /dev/null +++ b/MP.Stats/Properties/PublishProfiles/IISProfile.pubxml @@ -0,0 +1,21 @@ + + + + + Package + Release + Any CPU + + True + False + d9901b50-e61c-400c-b62c-fa060cf72c29 + bin\publish\MP.Stats.zip + true + Default Web Site/MP/STATS + net5.0 + false + + \ No newline at end of file diff --git a/MP.Stats/Properties/PublishProfiles/IISProfile.pubxml.user b/MP.Stats/Properties/PublishProfiles/IISProfile.pubxml.user new file mode 100644 index 00000000..fee355b9 --- /dev/null +++ b/MP.Stats/Properties/PublishProfiles/IISProfile.pubxml.user @@ -0,0 +1,11 @@ + + + + + + True|2021-05-25T14:38:26.4142377Z; + + \ No newline at end of file diff --git a/MP.Stats/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml.user b/MP.Stats/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml.user new file mode 100644 index 00000000..409c9155 --- /dev/null +++ b/MP.Stats/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml.user @@ -0,0 +1,12 @@ + + + + + + AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA+11nhJeDSkeTlSej+COD3AAAAAACAAAAAAADZgAAwAAAABAAAADHiGtCyOetOyeT2xaFL+NDAAAAAASAAACgAAAAEAAAAAuYw1PbVDVdZhloQ7eVuTsYAAAAfA8iFmY49U48HUeRwWwQNsvZg5FRMf9SFAAAACB+0njgnTZ+1teEqoJcNV16idHL + True|2021-05-24T16:44:45.5388713Z;True|2021-05-24T18:23:50.6056375+02:00;True|2021-05-24T18:01:51.1166144+02:00;True|2021-05-24T17:07:21.6348703+02:00;True|2021-05-24T17:07:10.8304877+02:00;True|2021-05-24T11:12:19.8440009+02:00;True|2021-05-24T11:12:08.1362921+02:00;True|2021-05-22T12:03:42.2864462+02:00;True|2021-05-21T19:54:05.6348108+02:00;False|2021-05-21T19:53:46.2134560+02:00;True|2021-05-21T08:11:55.5022811+02:00;True|2021-05-20T19:40:34.2462833+02:00;True|2021-05-20T19:40:10.3931366+02:00;True|2021-05-20T17:27:02.9543079+02:00;True|2021-05-20T16:59:12.4323448+02:00;True|2021-05-20T16:58:55.5021812+02:00;False|2021-05-20T16:58:03.5161910+02:00;True|2021-05-19T19:28:03.8104716+02:00;True|2021-05-18T19:48:52.9083044+02:00;True|2021-05-18T18:15:50.2374168+02:00;True|2021-05-18T18:06:20.0997789+02:00;True|2021-05-18T14:56:33.7479984+02:00;True|2021-05-17T17:03:39.9822588+02:00;True|2021-05-17T16:33:53.4419457+02:00;True|2021-05-17T16:33:10.5405414+02:00;False|2021-05-17T16:30:04.8648550+02:00;False|2021-05-17T16:29:49.5085445+02:00; + + \ No newline at end of file From 0938c77d39725312df5dc8775cf5f25cad864e7c Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 25 May 2021 16:41:51 +0200 Subject: [PATCH 03/26] update profilo IIS01 x testing --- MP.Stats/Properties/PublishProfiles/IIS01.pubxml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MP.Stats/Properties/PublishProfiles/IIS01.pubxml b/MP.Stats/Properties/PublishProfiles/IIS01.pubxml index ac3c88c6..1c99fe68 100644 --- a/MP.Stats/Properties/PublishProfiles/IIS01.pubxml +++ b/MP.Stats/Properties/PublishProfiles/IIS01.pubxml @@ -15,7 +15,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt d9901b50-e61c-400c-b62c-fa060cf72c29 false https://IIS01:8172/MsDeploy.axd - Default Web Site/MP/STATS + Default Web Site/MP/STATS4 False WMSVC From b7cba4236c405b1bc454daa68883370f1a00cd1d Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 25 May 2021 16:42:04 +0200 Subject: [PATCH 04/26] fix async diario --- MP.Stats/Pages/Diario.razor.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MP.Stats/Pages/Diario.razor.cs b/MP.Stats/Pages/Diario.razor.cs index aff832fd..7d658435 100644 --- a/MP.Stats/Pages/Diario.razor.cs +++ b/MP.Stats/Pages/Diario.razor.cs @@ -158,11 +158,11 @@ namespace MP.Stats.Pages MessageService.EA_SearchUpdated -= OnSeachUpdated; } - public void OnSeachUpdated() + public async void OnSeachUpdated() { - InvokeAsync(() => + await InvokeAsync(() => { - UpdateData(); + Task task = UpdateData(); StateHasChanged(); }); } From 95914aa9f7ae2d6133ee481187a6812f1253b755 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 25 May 2021 16:42:13 +0200 Subject: [PATCH 05/26] Aggiunta elmah nel progetto (in RAM) --- MP.Stats/MP.Stats.csproj | 3 +++ MP.Stats/Startup.cs | 15 +++++++++++++++ MP.Stats/appsettings.Production.json | 4 ++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/MP.Stats/MP.Stats.csproj b/MP.Stats/MP.Stats.csproj index b775dfbc..a9dd7834 100644 --- a/MP.Stats/MP.Stats.csproj +++ b/MP.Stats/MP.Stats.csproj @@ -35,6 +35,9 @@ + + + diff --git a/MP.Stats/Startup.cs b/MP.Stats/Startup.cs index ce61a417..4de03884 100644 --- a/MP.Stats/Startup.cs +++ b/MP.Stats/Startup.cs @@ -1,3 +1,5 @@ +using ElmahCore.Mvc; +using ElmahCore.Sql; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Hosting; @@ -62,6 +64,11 @@ namespace MP.Stats FallBackToParentCultures = false }); CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CreateSpecificCulture("it-IT"); + + // Registrazione Elmah: + // https://github.com/ElmahCore/ElmahCore + app.UseElmah(); + app.UseHttpsRedirection(); app.UseStaticFiles(); @@ -85,6 +92,14 @@ namespace MP.Stats .AddBootstrapProviders() .AddFontAwesomeIcons(); + // Elmah + services.AddElmah(); + //string elmaConn = "Data Source=SQL2016DEV;Initial Catalog=Elmah;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=SHERPA.BBM;"; + //services.AddElmah(options => + //{ + // options.ConnectionString = elmaConn; + //}); + services.AddStackExchangeRedisCache(options => { options.Configuration = "localhost:6379"; diff --git a/MP.Stats/appsettings.Production.json b/MP.Stats/appsettings.Production.json index 305d1b92..a3a64aa0 100644 --- a/MP.Stats/appsettings.Production.json +++ b/MP.Stats/appsettings.Production.json @@ -9,7 +9,7 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - "DefaultConnection": "Server=SQL2016DEV;Database=MoonPro_STATS;Trusted_Connection=True;MultipleActiveResultSets=true", - "Mp.Stats": "Server=SQL2016DEV;Database=MoonPro_STATS;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.STATS;" + "DefaultConnection": "Server=localhost\\SQLEXPRESS;Database=MoonPro_STATS;Trusted_Connection=True;MultipleActiveResultSets=true", + "Mp.Stats": "Server=localhost\\SQLEXPRESS;Database=MoonPro_STATS;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.STATS;" } } \ No newline at end of file From 3491974cb7305a96ffc39da9552755e1c5baed16 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 25 May 2021 18:12:32 +0200 Subject: [PATCH 06/26] Update config, funziona... --- MP.Stats/Properties/PublishProfiles/IIS01.pubxml | 2 +- MP.Stats/Properties/PublishProfiles/IIS01.pubxml.user | 2 +- .../Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml.user | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MP.Stats/Properties/PublishProfiles/IIS01.pubxml b/MP.Stats/Properties/PublishProfiles/IIS01.pubxml index 1c99fe68..ac3c88c6 100644 --- a/MP.Stats/Properties/PublishProfiles/IIS01.pubxml +++ b/MP.Stats/Properties/PublishProfiles/IIS01.pubxml @@ -15,7 +15,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt d9901b50-e61c-400c-b62c-fa060cf72c29 false https://IIS01:8172/MsDeploy.axd - Default Web Site/MP/STATS4 + Default Web Site/MP/STATS False WMSVC diff --git a/MP.Stats/Properties/PublishProfiles/IIS01.pubxml.user b/MP.Stats/Properties/PublishProfiles/IIS01.pubxml.user index 7c96d8bb..8ebe8fe3 100644 --- a/MP.Stats/Properties/PublishProfiles/IIS01.pubxml.user +++ b/MP.Stats/Properties/PublishProfiles/IIS01.pubxml.user @@ -7,6 +7,6 @@ by editing this MSBuild file. In order to learn more about this please visit htt AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA+11nhJeDSkeTlSej+COD3AAAAAACAAAAAAADZgAAwAAAABAAAACFCXZ0UR7Czo59aaRCHU5QAAAAAASAAACgAAAAEAAAACYlKt9E6s77uEikpKwyhdQYAAAAUwae989LovFbsfjRp69HCVpyUQZbqLyYFAAAAMW8mLSAxWmKaOvB4nkDgUpS27/b - True|2021-05-25T14:26:34.1426996Z;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00; + True|2021-05-25T15:48:33.3901785Z;True|2021-05-25T17:46:09.2063020+02:00;True|2021-05-25T17:42:47.8167539+02:00;True|2021-05-25T17:22:03.1877438+02:00;True|2021-05-25T17:21:05.1565775+02:00;True|2021-05-25T16:26:34.1426996+02:00;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00; \ No newline at end of file diff --git a/MP.Stats/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml.user b/MP.Stats/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml.user index 409c9155..0ee5e6ce 100644 --- a/MP.Stats/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml.user +++ b/MP.Stats/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml.user @@ -7,6 +7,6 @@ by editing this MSBuild file. In order to learn more about this please visit htt AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA+11nhJeDSkeTlSej+COD3AAAAAACAAAAAAADZgAAwAAAABAAAADHiGtCyOetOyeT2xaFL+NDAAAAAASAAACgAAAAEAAAAAuYw1PbVDVdZhloQ7eVuTsYAAAAfA8iFmY49U48HUeRwWwQNsvZg5FRMf9SFAAAACB+0njgnTZ+1teEqoJcNV16idHL - True|2021-05-24T16:44:45.5388713Z;True|2021-05-24T18:23:50.6056375+02:00;True|2021-05-24T18:01:51.1166144+02:00;True|2021-05-24T17:07:21.6348703+02:00;True|2021-05-24T17:07:10.8304877+02:00;True|2021-05-24T11:12:19.8440009+02:00;True|2021-05-24T11:12:08.1362921+02:00;True|2021-05-22T12:03:42.2864462+02:00;True|2021-05-21T19:54:05.6348108+02:00;False|2021-05-21T19:53:46.2134560+02:00;True|2021-05-21T08:11:55.5022811+02:00;True|2021-05-20T19:40:34.2462833+02:00;True|2021-05-20T19:40:10.3931366+02:00;True|2021-05-20T17:27:02.9543079+02:00;True|2021-05-20T16:59:12.4323448+02:00;True|2021-05-20T16:58:55.5021812+02:00;False|2021-05-20T16:58:03.5161910+02:00;True|2021-05-19T19:28:03.8104716+02:00;True|2021-05-18T19:48:52.9083044+02:00;True|2021-05-18T18:15:50.2374168+02:00;True|2021-05-18T18:06:20.0997789+02:00;True|2021-05-18T14:56:33.7479984+02:00;True|2021-05-17T17:03:39.9822588+02:00;True|2021-05-17T16:33:53.4419457+02:00;True|2021-05-17T16:33:10.5405414+02:00;False|2021-05-17T16:30:04.8648550+02:00;False|2021-05-17T16:29:49.5085445+02:00; + True|2021-05-25T14:56:57.0194126Z;True|2021-05-24T18:44:45.5388713+02:00;True|2021-05-24T18:23:50.6056375+02:00;True|2021-05-24T18:01:51.1166144+02:00;True|2021-05-24T17:07:21.6348703+02:00;True|2021-05-24T17:07:10.8304877+02:00;True|2021-05-24T11:12:19.8440009+02:00;True|2021-05-24T11:12:08.1362921+02:00;True|2021-05-22T12:03:42.2864462+02:00;True|2021-05-21T19:54:05.6348108+02:00;False|2021-05-21T19:53:46.2134560+02:00;True|2021-05-21T08:11:55.5022811+02:00;True|2021-05-20T19:40:34.2462833+02:00;True|2021-05-20T19:40:10.3931366+02:00;True|2021-05-20T17:27:02.9543079+02:00;True|2021-05-20T16:59:12.4323448+02:00;True|2021-05-20T16:58:55.5021812+02:00;False|2021-05-20T16:58:03.5161910+02:00;True|2021-05-19T19:28:03.8104716+02:00;True|2021-05-18T19:48:52.9083044+02:00;True|2021-05-18T18:15:50.2374168+02:00;True|2021-05-18T18:06:20.0997789+02:00;True|2021-05-18T14:56:33.7479984+02:00;True|2021-05-17T17:03:39.9822588+02:00;True|2021-05-17T16:33:53.4419457+02:00;True|2021-05-17T16:33:10.5405414+02:00;False|2021-05-17T16:30:04.8648550+02:00;False|2021-05-17T16:29:49.5085445+02:00; \ No newline at end of file From 56a02fe574396094a4bd94096e1c5d3ebe8c2782 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 25 May 2021 18:22:02 +0200 Subject: [PATCH 07/26] primo commit CI-CD --- .gitlab-ci.yml | 237 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 237 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..fb6da2a2 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,237 @@ +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' + VERS_MAIN: '1.0' + NEW_REL: '' + +# helper x fix pacchetti nuget da repo locale nexus.steamware.net +.nuget-fix: &nuget-fix + - | + $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`"" + } else { + C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`"" + } + echo $hasSource + +# helper x fix version number +.version-fix: &version-fix + - | + $env:NEW_REL = $env:VERS_MAIN+"."+(get-date –format yyMM)+"."+$CI_PIPELINE_IID + echo "Set vers: $env:NEW_REL" + $contenuto = Get-Content -path 'VersGen\GPW.cs' -Raw + $newContenuto = $contenuto -replace '0.0.0.0', $env:NEW_REL + $newContenuto | Set-Content -Path 'VersGen\GPW.cs' + +stages: + - build + - test + - release + +build: + stage: build + script: + - dotnet build + +# test: +# stage: test +# script: +# - dotnet test + +# release: +# stage: release +# only: +# - master +# artifacts: +# paths: +# - publish/ +# script: +# - dotnet publish -c Release -o ../publish MyApp/MyApp.csproj + + + +# stages: +# - build +# - staging +# - deploy +# - installer + + +# AC:build: +# stage: build +# before_script: +# - *nuget-fix +# - '& "$env:NUGET_PATH" restore GPW.sln' # path alla solution corrente +# - *version-fix +# script: +# - '& "$env:MSBUILD_PATH" GPW_Admin/GPW_Admin.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m' + +# - '& "$env:MSBUILD_PATH" GPW_Commesse/GPW_Commesse.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m' +# # \ cache: +# # #key: ${CI_COMMIT_REF_SLUG} +# # # key: ${CI_JOB_NAME} +# # key: GPW-pack +# # paths: +# # - packages/ +# # artifacts: +# # expire_in: 1 week # save gitlab server space, we copy the files we need to deploy folder later on +# # paths: +# # # - '$env:EXE_RELEASE_FOLDER\YourApp.exe' # saving exe to copy to deploy folder +# # # - '$env:MSI_RELEASE_FOLDER\YourApp Setup.msi' # saving msi to copy to deploy folder +# # # - '$env:TEST_FOLDER\' # saving entire Test project so NUnit can run tests +# # - '$env:EXE_RELEASE_FOLDER\GPW_Barcode\' # saving entire Test project so NUnit can run tests +# # - '$env:DEPLOY_FOLDER\GPW_Barcode\' # saving entire Test project so NUnit can run tests + +# BHS:build: +# stage: build +# before_script: +# - *nuget-fix +# - '& "$env:NUGET_PATH" restore GPW.sln' +# - *version-fix +# script: +# - '& "$env:MSBUILD_PATH" GPW_Barcode/GPW_Barcode.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m' +# - '& "$env:MSBUILD_PATH" HOME/HOME.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m' +# - '& "$env:MSBUILD_PATH" GPW_Smart/GPW_Smart.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m' + + +# # test_job: +# # stage: test +# # only: +# # - tags +# # script: +# # - '& "$env:NUNIT_PATH" ".\$env:TEST_FOLDER\Tests.dll"' # running NUnit tests +# # artifacts: +# # when: always # save test results even when the task fails +# # expire_in: 1 week # save gitlab server space, we copy the files we need to deploy folder later on +# # paths: +# # - '.\TestResult.xml' # saving NUnit results to copy to deploy folder +# # dependencies: +# # - build_job + + +# AC: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_Admin/GPW_Admin.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_Commesse/GPW_Commesse.csproj' +# # cache: +# # #key: ${CI_COMMIT_REF_SLUG} +# # # key: ${CI_JOB_NAME} +# # key: GPW-pack +# # paths: +# # - packages/ +# # policy: pull +# needs: ["AC:build"] +# # when: +# # manual + +# 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: +# - if: '$CI_COMMIT_BRANCH == "master"' +# when: manual +# # only: +# # - tags # the build process will only be started by git tag commits +# before_script: +# - *nuget-fix +# - '& "$env:NUGET_PATH" restore GPW.sln' +# - *version-fix +# script: +# # Admin 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_Admin.zip /p:DeployIisAppPath="Default Web Site/GPW/ADMIN" /p:PackageAsSingleFile=True /p:OutputPath=bin/ GPW_Admin/GPW_Admin.csproj' +# # Commesse 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_Commesse.zip /p:DeployIisAppPath="Default Web Site/GPW/ADMIN" /p:PackageAsSingleFile=True /p:OutputPath=bin/ GPW_Commesse/GPW_Commesse.csproj' +# 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"] From 43d5069f421720b32ad95afc0634bd7a3b42db35 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 25 May 2021 18:38:25 +0200 Subject: [PATCH 08/26] Aggiunta fase test x CI/CD --- .gitlab-ci.yml | 8 ++++---- README.md | 8 +++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb6da2a2..6fcc244c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,10 +37,10 @@ build: script: - dotnet build -# test: -# stage: test -# script: -# - dotnet test +test: + stage: test + script: + - dotnet test # release: # stage: release diff --git a/README.md b/README.md index 3b441b0c..56279eb3 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ # MAPO-CORE -MAPO dotNet Core Web Project, repository progetti next gen su Blazor & co \ No newline at end of file +MAPO dotNet Core Web Project, repository progetti next gen su Blazor & co + +Applicazione multipiattaforma (gira su win, mac, linux), tramite IIS o altro. + +## Installazione + +Vedere pagina wiki x blazor: https://wiki.steamware.net/doku.php?id=blazor \ No newline at end of file From aa94b5904ab4b8d60d8411c22d87cc10ceb7fe0a Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 25 May 2021 18:41:51 +0200 Subject: [PATCH 09/26] Aggiunta fase di release (test preliminare) --- .gitlab-ci.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6fcc244c..5dd9da90 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,15 +42,16 @@ test: script: - dotnet test -# release: -# stage: release -# only: -# - master -# artifacts: -# paths: -# - publish/ -# script: -# - dotnet publish -c Release -o ../publish MyApp/MyApp.csproj +release: + stage: release + only: + - Deploy_CI_CD + # - master + artifacts: + paths: + - publish/ + script: + - dotnet publish -c Release -o ../publish MP.Stats/MP.Stats.csproj From c6fcebcd75d937f173fc0d3afa84f36d30d9e486 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 25 May 2021 18:44:46 +0200 Subject: [PATCH 10/26] correzione ramo x release --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5dd9da90..3174b4d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,7 +45,7 @@ test: release: stage: release only: - - Deploy_CI_CD + - feature/Deploy_CI_CD # - master artifacts: paths: From e786a10511a3bc75b5b51b281ec81eda89cfaaf2 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 25 May 2021 18:53:41 +0200 Subject: [PATCH 11/26] modifica posizione pubblicazione file --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3174b4d3..c04bec27 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -39,6 +39,8 @@ build: test: stage: test + only: + - develop script: - dotnet test @@ -51,7 +53,7 @@ release: paths: - publish/ script: - - dotnet publish -c Release -o ../publish MP.Stats/MP.Stats.csproj + - dotnet publish -c Release -o ./publish MP.Stats/MP.Stats.csproj From 4b526ad4d8df919f5d567dbc2521e0180a93b8f0 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 25 May 2021 19:37:28 +0200 Subject: [PATCH 12/26] Update script versione --- .gitlab-ci.yml | 38 +++++++++++++++++---------------- MP.Stats/MP.Stats.csproj | 8 +++++-- MP.Stats/Pages/_Host.cshtml.bak | 35 ------------------------------ 3 files changed, 26 insertions(+), 55 deletions(-) delete mode 100644 MP.Stats/Pages/_Host.cshtml.bak diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c04bec27..4d139c8a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,9 @@ variables: - NUGET_PATH: 'C:\Tools\nuget.exe' +# 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' +# EXE_RELEASE_FOLDER: 'c:\Projetcs\Compiled\GPW\Release' +# DEPLOY_FOLDER: 'c:\Projects\Deploy\GPW\Builds' VERS_MAIN: '1.0' NEW_REL: '' @@ -18,21 +18,29 @@ variables: } echo $hasSource -# helper x fix version number -.version-fix: &version-fix - - | - $env:NEW_REL = $env:VERS_MAIN+"."+(get-date –format yyMM)+"."+$CI_PIPELINE_IID - echo "Set vers: $env:NEW_REL" - $contenuto = Get-Content -path 'VersGen\GPW.cs' -Raw - $newContenuto = $contenuto -replace '0.0.0.0', $env:NEW_REL - $newContenuto | Set-Content -Path 'VersGen\GPW.cs' +# # helper x fix version number +# .version-fix: &version-fix +# - | +# $env:NEW_REL = $env:VERS_MAIN+"."+(get-date –format yyMM)+"."+$CI_PIPELINE_IID +# echo "Set vers: $env:NEW_REL" +# $contenuto = Get-Content -path 'VersGen\GPW.cs' -Raw +# $newContenuto = $contenuto -replace '0.0.0.0', $env:NEW_REL +# $newContenuto | Set-Content -Path 'VersGen\GPW.cs' stages: - build - test - release +# - staging +# - deploy +# - installer build: + stage: build + before_script: + - *nuget-fix + - dotnet restore + # - *version-fix stage: build script: - dotnet build @@ -48,7 +56,7 @@ release: stage: release only: - feature/Deploy_CI_CD - # - master + - master artifacts: paths: - publish/ @@ -57,12 +65,6 @@ release: -# stages: -# - build -# - staging -# - deploy -# - installer - # AC:build: # stage: build diff --git a/MP.Stats/MP.Stats.csproj b/MP.Stats/MP.Stats.csproj index a9dd7834..bd8ec4ec 100644 --- a/MP.Stats/MP.Stats.csproj +++ b/MP.Stats/MP.Stats.csproj @@ -1,9 +1,10 @@ - + net5.0 MP.Stats 826e877c-ba70-4253-84cb-d0b1cafd4440 + 1.0.0.0 @@ -46,4 +47,7 @@ PreserveNewest - \ No newline at end of file + + + + diff --git a/MP.Stats/Pages/_Host.cshtml.bak b/MP.Stats/Pages/_Host.cshtml.bak deleted file mode 100644 index 8c6accba..00000000 --- a/MP.Stats/Pages/_Host.cshtml.bak +++ /dev/null @@ -1,35 +0,0 @@ -@page "/" -@namespace MP.Stats.Pages -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -@{ - Layout = null; -} - - - - - - - MP-STATS - - - - - - - - -
- - An error has occurred. This application may no longer respond until reloaded. - - - An unhandled exception has occurred. See browser dev tools for details. - - Reload - 🗙 -
- - - - From c32240653b6548d782c290643a5100870c264595 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 25 May 2021 19:42:20 +0200 Subject: [PATCH 13/26] fix yml indent --- .gitlab-ci.yml | 16 +++------------- MP.Stats/MP.Stats.csproj | 2 +- MP.Stats/post-build.ps1 | 2 +- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4d139c8a..426917e5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,14 +18,6 @@ variables: } echo $hasSource -# # helper x fix version number -# .version-fix: &version-fix -# - | -# $env:NEW_REL = $env:VERS_MAIN+"."+(get-date –format yyMM)+"."+$CI_PIPELINE_IID -# echo "Set vers: $env:NEW_REL" -# $contenuto = Get-Content -path 'VersGen\GPW.cs' -Raw -# $newContenuto = $contenuto -replace '0.0.0.0', $env:NEW_REL -# $newContenuto | Set-Content -Path 'VersGen\GPW.cs' stages: - build @@ -36,12 +28,10 @@ stages: # - installer build: - stage: build - before_script: - - *nuget-fix - - dotnet restore - # - *version-fix stage: build + before_script: + - *nuget-fix + - dotnet restore script: - dotnet build diff --git a/MP.Stats/MP.Stats.csproj b/MP.Stats/MP.Stats.csproj index bd8ec4ec..dd1c46ad 100644 --- a/MP.Stats/MP.Stats.csproj +++ b/MP.Stats/MP.Stats.csproj @@ -4,7 +4,7 @@ net5.0 MP.Stats 826e877c-ba70-4253-84cb-d0b1cafd4440 - 1.0.0.0 + 1.0.2105.2519 diff --git a/MP.Stats/post-build.ps1 b/MP.Stats/post-build.ps1 index 625f16ba..dc0fc8e1 100644 --- a/MP.Stats/post-build.ps1 +++ b/MP.Stats/post-build.ps1 @@ -2,7 +2,7 @@ $MajMin="1.0." $currentDate = get-date -format yyMM; -$currentTime = get-date -format HHmm; +$currentTime = get-date -format ddHH; $find = "(.|\n)*?"; $replace = "" + $MajMin + $currentDate +"." + $currentTime + ""; $csproj = Get-Content $ProjectPath From 7139e722ca35eb2c74dc2f693b1cf3c1afe39008 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 25 May 2021 19:45:35 +0200 Subject: [PATCH 14/26] Aggiunto stage needs x precedenze --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 426917e5..f859d85d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -39,6 +39,7 @@ test: stage: test only: - develop + needs: ["build"] script: - dotnet test @@ -47,6 +48,7 @@ release: only: - feature/Deploy_CI_CD - master + needs: ["build"] artifacts: paths: - publish/ From 84672fbd7d507cae59ba34b86f6113848c2f4eea Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 26 May 2021 19:43:08 +0200 Subject: [PATCH 15/26] Aggiunto logging e misura tempi recupero dati --- MP.Data/Controllers/MpStatsController.cs | 8 ++++- MP.Stats/Data/MpStatsService.cs | 40 ++++++++++++++++++++- MP.Stats/MP.Stats.csproj | 3 +- MP.Stats/NLog.config | 46 ++++++++++++++++++++++++ MP.Stats/Program.cs | 40 +++++++++++++++++---- MP.Stats/Startup.cs | 15 +++----- 6 files changed, 132 insertions(+), 20 deletions(-) create mode 100644 MP.Stats/NLog.config diff --git a/MP.Data/Controllers/MpStatsController.cs b/MP.Data/Controllers/MpStatsController.cs index 8a01f41f..d02a1c02 100644 --- a/MP.Data/Controllers/MpStatsController.cs +++ b/MP.Data/Controllers/MpStatsController.cs @@ -27,7 +27,7 @@ namespace MP.Data.Controllers { _configuration = configuration; dbCtx = new MoonPro_STATSContext(configuration); - Log.Info("Avviata classe MpStatsController.MpStatsController"); + Log.Info("Avviata classe MpStatsController"); } #endregion Public Constructors @@ -111,6 +111,12 @@ namespace MP.Data.Controllers return dbResult; } + public void ResetController() + { + dbCtx = new MoonPro_STATSContext(_configuration); + Log.Info("Effettuato reset MpStatsController"); + } + /// /// Annulla modifiche su una specifica entity (cancel update) /// diff --git a/MP.Stats/Data/MpStatsService.cs b/MP.Stats/Data/MpStatsService.cs index 659d7a45..123f1a8f 100644 --- a/MP.Stats/Data/MpStatsService.cs +++ b/MP.Stats/Data/MpStatsService.cs @@ -10,6 +10,8 @@ using MP.Data; using Microsoft.Extensions.Caching.Distributed; using Microsoft.Extensions.Caching.Memory; using Newtonsoft.Json; +using System.Diagnostics; +using NLog; namespace MP.Stats.Data { @@ -21,6 +23,7 @@ namespace MP.Stats.Data private static ILogger _logger; private static List ActionsList = new List(); + private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); private readonly IDistributedCache distributedCache; private readonly IMemoryCache memoryCache; @@ -31,7 +34,7 @@ namespace MP.Stats.Data /// /// Durata della cache in modalità inattiva (non acceduta) prima di venire rimossa - /// NON estende oltre il tempo massimo di validità Abs della cache + /// NON estende oltre il tempo massimo di validità della cache (chAbsExp) /// private int chSliExp = 5; @@ -116,10 +119,15 @@ namespace MP.Stats.Data } else { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); dbResult = dbController.ActionsGetAll(); rawData = JsonConvert.SerializeObject(dbResult); redisDataList = Encoding.UTF8.GetBytes(rawData); await distributedCache.SetAsync(cacheKey, redisDataList, cacheOpt); + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Info($"Effettuata lettura da DB + caching per AzioniUL: {ts.TotalMilliseconds} ms"); } return await Task.FromResult(dbResult); } @@ -187,10 +195,15 @@ namespace MP.Stats.Data } else { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); dbResult = dbController.StatControlliGetAll(CurrFilter.DateStart, CurrFilter.DateEnd, CurrFilter.IdxMacchina, CurrFilter.IdxOdl, CurrFilter.KeyRichiesta, CurrFilter.CodArticolo); rawData = JsonConvert.SerializeObject(dbResult); redisDataList = Encoding.UTF8.GetBytes(rawData); await distributedCache.SetAsync(cacheKey, redisDataList, cacheOpt); + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Info($"Effettuata lettura da DB + caching per ResControlli: {ts.TotalMilliseconds} ms"); } return await Task.FromResult(dbResult); } @@ -209,10 +222,15 @@ namespace MP.Stats.Data } else { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); dbResult = dbController.StatDdbGetAll(CurrFilter.DateStart, CurrFilter.DateEnd, CurrFilter.IdxMacchina, CurrFilter.IdxOdl, CurrFilter.KeyRichiesta, CurrFilter.CodArticolo); rawData = JsonConvert.SerializeObject(dbResult); redisDataList = Encoding.UTF8.GetBytes(rawData); await distributedCache.SetAsync(cacheKey, redisDataList, cacheOpt); + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Info($"Effettuata lettura da DB + caching per DdbTurni: {ts.TotalMilliseconds} ms"); } return await Task.FromResult(dbResult); } @@ -231,10 +249,15 @@ namespace MP.Stats.Data } else { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); dbResult = dbController.StatOdlGetAll(CurrFilter.DateStart, CurrFilter.DateEnd, CurrFilter.IdxMacchina, CurrFilter.IdxOdl, CurrFilter.KeyRichiesta, CurrFilter.CodArticolo); rawData = JsonConvert.SerializeObject(dbResult); redisDataList = Encoding.UTF8.GetBytes(rawData); await distributedCache.SetAsync(cacheKey, redisDataList, cacheOpt); + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Info($"Effettuata lettura da DB + caching per ODL: {ts.TotalMilliseconds} ms"); } return await Task.FromResult(dbResult); } @@ -253,10 +276,15 @@ namespace MP.Stats.Data } else { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); dbResult = dbController.StatScartiGetAll(CurrFilter.DateStart, CurrFilter.DateEnd, CurrFilter.IdxMacchina, CurrFilter.IdxOdl, CurrFilter.KeyRichiesta, CurrFilter.CodArticolo); rawData = JsonConvert.SerializeObject(dbResult); redisDataList = Encoding.UTF8.GetBytes(rawData); await distributedCache.SetAsync(cacheKey, redisDataList, cacheOpt); + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Info($"Effettuata lettura da DB + caching per ResScarti: {ts.TotalMilliseconds} ms"); } return await Task.FromResult(dbResult); } @@ -279,10 +307,15 @@ namespace MP.Stats.Data } else { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); dbResult = dbController.StatTurniOeeGetAll(CurrFilter.DateStart, CurrFilter.DateEnd, CurrFilter.IdxMacchina, CurrFilter.IdxOdl, CurrFilter.KeyRichiesta, CurrFilter.CodArticolo); rawData = JsonConvert.SerializeObject(dbResult); redisDataList = Encoding.UTF8.GetBytes(rawData); await distributedCache.SetAsync(cacheKey, redisDataList, cacheOpt); + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Info($"Effettuata lettura da DB + caching per TurniOee: {ts.TotalMilliseconds} ms"); } return await Task.FromResult(dbResult); } @@ -301,10 +334,15 @@ namespace MP.Stats.Data } else { + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); dbResult = dbController.StatUserLogGetAll(CurrFilter.DateStart, CurrFilter.DateEnd, CurrFilter.IdxMacchina, CurrFilter.IdxOdl, CurrFilter.KeyRichiesta, CurrFilter.CodArticolo); rawData = JsonConvert.SerializeObject(dbResult); redisDataList = Encoding.UTF8.GetBytes(rawData); await distributedCache.SetAsync(cacheKey, redisDataList, cacheOpt); + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Info($"Effettuata lettura da DB + caching per UserActionLog: {ts.TotalMilliseconds} ms"); } return await Task.FromResult(dbResult); } diff --git a/MP.Stats/MP.Stats.csproj b/MP.Stats/MP.Stats.csproj index dd1c46ad..c373b569 100644 --- a/MP.Stats/MP.Stats.csproj +++ b/MP.Stats/MP.Stats.csproj @@ -4,7 +4,7 @@ net5.0 MP.Stats 826e877c-ba70-4253-84cb-d0b1cafd4440 - 1.0.2105.2519 + 1.0.2105.2619 @@ -40,6 +40,7 @@ + diff --git a/MP.Stats/NLog.config b/MP.Stats/NLog.config new file mode 100644 index 00000000..b98c52ca --- /dev/null +++ b/MP.Stats/NLog.config @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MP.Stats/Program.cs b/MP.Stats/Program.cs index f159f7fc..1726dc14 100644 --- a/MP.Stats/Program.cs +++ b/MP.Stats/Program.cs @@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; +using NLog.Web; using System; using System.Collections.Generic; using System.Linq; @@ -11,16 +12,43 @@ namespace MP.Stats { public class Program { - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } + #region Public Methods public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); - }); + }) + .ConfigureLogging(logging => + { + logging.ClearProviders(); + logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace); + }) + .UseNLog(); + + public static void Main(string[] args) + { + // inclusione NLog: + // https://github.com/NLog/NLog/wiki/Getting-started-with-ASP.NET-Core-5 + // https://codewithmukesh.com/blog/logging-with-nlog-in-aspnet-core/ + var logger = NLog.Web.NLogBuilder.ConfigureNLog("NLog.config").GetCurrentClassLogger(); + try + { + logger.Info("MP.STATS Application Starting Up"); + CreateHostBuilder(args).Build().Run(); + } + catch (Exception exception) + { + logger.Error(exception, "Stopped MP.STATS program because of exception"); + throw; + } + finally + { + NLog.LogManager.Shutdown(); + } + } + + #endregion Public Methods } -} +} \ No newline at end of file diff --git a/MP.Stats/Startup.cs b/MP.Stats/Startup.cs index 4de03884..b835f23a 100644 --- a/MP.Stats/Startup.cs +++ b/MP.Stats/Startup.cs @@ -1,22 +1,15 @@ +using Blazorise; +using Blazorise.Bootstrap; +using Blazorise.Icons.FontAwesome; using ElmahCore.Mvc; -using ElmahCore.Sql; using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Localization; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using MP.Stats.Data; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Localization; using System.Globalization; -using Blazorise; -using Blazorise.Bootstrap; -using Blazorise.Icons.FontAwesome; namespace MP.Stats { From bb08548f7c8e6e24b3678d0965cc7f32f42a65fb Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 26 May 2021 19:43:12 +0200 Subject: [PATCH 16/26] pulizia --- MP.Stats/appsettings.json.bak | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 MP.Stats/appsettings.json.bak diff --git a/MP.Stats/appsettings.json.bak b/MP.Stats/appsettings.json.bak deleted file mode 100644 index d9d9a9bf..00000000 --- a/MP.Stats/appsettings.json.bak +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - }, - "AllowedHosts": "*" -} From bdca17ebf067daad3d3f3434051b43b24732a1ee Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 26 May 2021 19:47:29 +0200 Subject: [PATCH 17/26] Fix padding grafici --- MP.Stats/Components/ChartControlli.razor | 2 +- MP.Stats/Components/ChartOEE.razor | 2 +- MP.Stats/Components/ChartScarti.razor | 2 +- MP.Stats/Components/ChartUserLog.razor | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MP.Stats/Components/ChartControlli.razor b/MP.Stats/Components/ChartControlli.razor index 40f2a97c..2f870d3d 100644 --- a/MP.Stats/Components/ChartControlli.razor +++ b/MP.Stats/Components/ChartControlli.razor @@ -7,7 +7,7 @@ } else { -
+
    @foreach (var item in @ParetoData) { diff --git a/MP.Stats/Components/ChartOEE.razor b/MP.Stats/Components/ChartOEE.razor index dfd64fad..977b55c0 100644 --- a/MP.Stats/Components/ChartOEE.razor +++ b/MP.Stats/Components/ChartOEE.razor @@ -7,7 +7,7 @@ } else { -
    +
      @foreach (var item in @ParetoData) { diff --git a/MP.Stats/Components/ChartScarti.razor b/MP.Stats/Components/ChartScarti.razor index 25dfe00a..bfc68ed0 100644 --- a/MP.Stats/Components/ChartScarti.razor +++ b/MP.Stats/Components/ChartScarti.razor @@ -7,7 +7,7 @@ } else { -
      +
        @foreach (var item in @ParetoData) { diff --git a/MP.Stats/Components/ChartUserLog.razor b/MP.Stats/Components/ChartUserLog.razor index 40f2a97c..2f870d3d 100644 --- a/MP.Stats/Components/ChartUserLog.razor +++ b/MP.Stats/Components/ChartUserLog.razor @@ -7,7 +7,7 @@ } else { -
        +
          @foreach (var item in @ParetoData) { From 774ef6a68bc0b2bbad7d50054acee8d4b5de998d Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 26 May 2021 20:18:44 +0200 Subject: [PATCH 18/26] refresh + test yml x staging build --- .gitlab-ci.yml | 86 +++---------------- .../PublishProfiles/IIS01.pubxml.user | 2 +- .../PublishProfiles/IIS02.pubxml.user | 1 + .../PublishProfiles/IISProfile.pubxml.user | 2 +- .../W2019-IIS-DEVProfile.pubxml.user | 2 +- 5 files changed, 16 insertions(+), 77 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f859d85d..d0269f53 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,9 +22,9 @@ variables: stages: - build - test - - release -# - staging + - staging # - deploy + - release # - installer build: @@ -58,79 +58,17 @@ release: -# AC:build: -# stage: build -# before_script: -# - *nuget-fix -# - '& "$env:NUGET_PATH" restore GPW.sln' # path alla solution corrente -# - *version-fix -# script: -# - '& "$env:MSBUILD_PATH" GPW_Admin/GPW_Admin.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m' -# - '& "$env:MSBUILD_PATH" GPW_Commesse/GPW_Commesse.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m' -# # \ cache: -# # #key: ${CI_COMMIT_REF_SLUG} -# # # key: ${CI_JOB_NAME} -# # key: GPW-pack -# # paths: -# # - packages/ -# # artifacts: -# # expire_in: 1 week # save gitlab server space, we copy the files we need to deploy folder later on -# # paths: -# # # - '$env:EXE_RELEASE_FOLDER\YourApp.exe' # saving exe to copy to deploy folder -# # # - '$env:MSI_RELEASE_FOLDER\YourApp Setup.msi' # saving msi to copy to deploy folder -# # # - '$env:TEST_FOLDER\' # saving entire Test project so NUnit can run tests -# # - '$env:EXE_RELEASE_FOLDER\GPW_Barcode\' # saving entire Test project so NUnit can run tests -# # - '$env:DEPLOY_FOLDER\GPW_Barcode\' # saving entire Test project so NUnit can run tests - -# BHS:build: -# stage: build -# before_script: -# - *nuget-fix -# - '& "$env:NUGET_PATH" restore GPW.sln' -# - *version-fix -# script: -# - '& "$env:MSBUILD_PATH" GPW_Barcode/GPW_Barcode.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m' -# - '& "$env:MSBUILD_PATH" HOME/HOME.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m' -# - '& "$env:MSBUILD_PATH" GPW_Smart/GPW_Smart.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /verbosity:minimal /m' - - -# # test_job: -# # stage: test -# # only: -# # - tags -# # script: -# # - '& "$env:NUNIT_PATH" ".\$env:TEST_FOLDER\Tests.dll"' # running NUnit tests -# # artifacts: -# # when: always # save test results even when the task fails -# # expire_in: 1 week # save gitlab server space, we copy the files we need to deploy folder later on -# # paths: -# # - '.\TestResult.xml' # saving NUnit results to copy to deploy folder -# # dependencies: -# # - build_job - - -# AC: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_Admin/GPW_Admin.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_Commesse/GPW_Commesse.csproj' -# # cache: -# # #key: ${CI_COMMIT_REF_SLUG} -# # # key: ${CI_JOB_NAME} -# # key: GPW-pack -# # paths: -# # - packages/ -# # policy: pull -# needs: ["AC:build"] -# # when: -# # manual +staging: + stage: staging + only: + - develop + needs: ["build"] + before_script: + - *nuget-fix + - dotnet restore + script: + - dotnet publish -p:PublishReadyToRun=true -p:m=8 -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 MP.Stats/MP.Stats.csproj # BHS:staging: # stage: staging diff --git a/MP.Stats/Properties/PublishProfiles/IIS01.pubxml.user b/MP.Stats/Properties/PublishProfiles/IIS01.pubxml.user index 8ebe8fe3..15ec3170 100644 --- a/MP.Stats/Properties/PublishProfiles/IIS01.pubxml.user +++ b/MP.Stats/Properties/PublishProfiles/IIS01.pubxml.user @@ -7,6 +7,6 @@ by editing this MSBuild file. In order to learn more about this please visit htt AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA+11nhJeDSkeTlSej+COD3AAAAAACAAAAAAADZgAAwAAAABAAAACFCXZ0UR7Czo59aaRCHU5QAAAAAASAAACgAAAAEAAAACYlKt9E6s77uEikpKwyhdQYAAAAUwae989LovFbsfjRp69HCVpyUQZbqLyYFAAAAMW8mLSAxWmKaOvB4nkDgUpS27/b - True|2021-05-25T15:48:33.3901785Z;True|2021-05-25T17:46:09.2063020+02:00;True|2021-05-25T17:42:47.8167539+02:00;True|2021-05-25T17:22:03.1877438+02:00;True|2021-05-25T17:21:05.1565775+02:00;True|2021-05-25T16:26:34.1426996+02:00;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00; + True|2021-05-26T17:49:30.0427896Z;False|2021-05-26T19:49:14.9065510+02:00;True|2021-05-25T17:48:33.3901785+02:00;True|2021-05-25T17:46:09.2063020+02:00;True|2021-05-25T17:42:47.8167539+02:00;True|2021-05-25T17:22:03.1877438+02:00;True|2021-05-25T17:21:05.1565775+02:00;True|2021-05-25T16:26:34.1426996+02:00;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00; \ No newline at end of file diff --git a/MP.Stats/Properties/PublishProfiles/IIS02.pubxml.user b/MP.Stats/Properties/PublishProfiles/IIS02.pubxml.user index 8d468c51..4572facb 100644 --- a/MP.Stats/Properties/PublishProfiles/IIS02.pubxml.user +++ b/MP.Stats/Properties/PublishProfiles/IIS02.pubxml.user @@ -7,5 +7,6 @@ by editing this MSBuild file. In order to learn more about this please visit htt AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA+11nhJeDSkeTlSej+COD3AAAAAACAAAAAAADZgAAwAAAABAAAAB3zVMW24A4himhWJ5CNqgeAAAAAASAAACgAAAAEAAAAA7IL1n8zHn2/ljDNL4/zlsYAAAAgAEg9RYKHV0xl3wnafZiN9Q954GOBAvdFAAAACSBJkwDndNTiIrUuk7zJls84fN1 + True|2021-05-26T17:49:44.3836006Z; \ No newline at end of file diff --git a/MP.Stats/Properties/PublishProfiles/IISProfile.pubxml.user b/MP.Stats/Properties/PublishProfiles/IISProfile.pubxml.user index fee355b9..2a7c708a 100644 --- a/MP.Stats/Properties/PublishProfiles/IISProfile.pubxml.user +++ b/MP.Stats/Properties/PublishProfiles/IISProfile.pubxml.user @@ -6,6 +6,6 @@ by editing this MSBuild file. In order to learn more about this please visit htt - True|2021-05-25T14:38:26.4142377Z; + True|2021-05-26T17:51:13.5051479Z;True|2021-05-26T19:51:04.9283608+02:00;True|2021-05-25T16:38:26.4142377+02:00; \ No newline at end of file diff --git a/MP.Stats/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml.user b/MP.Stats/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml.user index 0ee5e6ce..5d77153d 100644 --- a/MP.Stats/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml.user +++ b/MP.Stats/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml.user @@ -7,6 +7,6 @@ by editing this MSBuild file. In order to learn more about this please visit htt AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA+11nhJeDSkeTlSej+COD3AAAAAACAAAAAAADZgAAwAAAABAAAADHiGtCyOetOyeT2xaFL+NDAAAAAASAAACgAAAAEAAAAAuYw1PbVDVdZhloQ7eVuTsYAAAAfA8iFmY49U48HUeRwWwQNsvZg5FRMf9SFAAAACB+0njgnTZ+1teEqoJcNV16idHL - True|2021-05-25T14:56:57.0194126Z;True|2021-05-24T18:44:45.5388713+02:00;True|2021-05-24T18:23:50.6056375+02:00;True|2021-05-24T18:01:51.1166144+02:00;True|2021-05-24T17:07:21.6348703+02:00;True|2021-05-24T17:07:10.8304877+02:00;True|2021-05-24T11:12:19.8440009+02:00;True|2021-05-24T11:12:08.1362921+02:00;True|2021-05-22T12:03:42.2864462+02:00;True|2021-05-21T19:54:05.6348108+02:00;False|2021-05-21T19:53:46.2134560+02:00;True|2021-05-21T08:11:55.5022811+02:00;True|2021-05-20T19:40:34.2462833+02:00;True|2021-05-20T19:40:10.3931366+02:00;True|2021-05-20T17:27:02.9543079+02:00;True|2021-05-20T16:59:12.4323448+02:00;True|2021-05-20T16:58:55.5021812+02:00;False|2021-05-20T16:58:03.5161910+02:00;True|2021-05-19T19:28:03.8104716+02:00;True|2021-05-18T19:48:52.9083044+02:00;True|2021-05-18T18:15:50.2374168+02:00;True|2021-05-18T18:06:20.0997789+02:00;True|2021-05-18T14:56:33.7479984+02:00;True|2021-05-17T17:03:39.9822588+02:00;True|2021-05-17T16:33:53.4419457+02:00;True|2021-05-17T16:33:10.5405414+02:00;False|2021-05-17T16:30:04.8648550+02:00;False|2021-05-17T16:29:49.5085445+02:00; + True|2021-05-26T17:49:56.4831784Z;True|2021-05-25T16:56:57.0194126+02:00;True|2021-05-24T18:44:45.5388713+02:00;True|2021-05-24T18:23:50.6056375+02:00;True|2021-05-24T18:01:51.1166144+02:00;True|2021-05-24T17:07:21.6348703+02:00;True|2021-05-24T17:07:10.8304877+02:00;True|2021-05-24T11:12:19.8440009+02:00;True|2021-05-24T11:12:08.1362921+02:00;True|2021-05-22T12:03:42.2864462+02:00;True|2021-05-21T19:54:05.6348108+02:00;False|2021-05-21T19:53:46.2134560+02:00;True|2021-05-21T08:11:55.5022811+02:00;True|2021-05-20T19:40:34.2462833+02:00;True|2021-05-20T19:40:10.3931366+02:00;True|2021-05-20T17:27:02.9543079+02:00;True|2021-05-20T16:59:12.4323448+02:00;True|2021-05-20T16:58:55.5021812+02:00;False|2021-05-20T16:58:03.5161910+02:00;True|2021-05-19T19:28:03.8104716+02:00;True|2021-05-18T19:48:52.9083044+02:00;True|2021-05-18T18:15:50.2374168+02:00;True|2021-05-18T18:06:20.0997789+02:00;True|2021-05-18T14:56:33.7479984+02:00;True|2021-05-17T17:03:39.9822588+02:00;True|2021-05-17T16:33:53.4419457+02:00;True|2021-05-17T16:33:10.5405414+02:00;False|2021-05-17T16:30:04.8648550+02:00;False|2021-05-17T16:29:49.5085445+02:00; \ No newline at end of file From f391c7abd8de7126486ef85de7f1ae57eb2338ad Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 26 May 2021 20:19:11 +0200 Subject: [PATCH 19/26] cambio dipendenze compilazione --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d0269f53..05f9c6cc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,8 +61,8 @@ release: staging: stage: staging - only: - - develop + # only: + # - develop needs: ["build"] before_script: - *nuget-fix From cd98fb6a7ede5072ba22330bd81a842b79b9eae9 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 26 May 2021 20:20:42 +0200 Subject: [PATCH 20/26] update syntax yml --- .gitlab-ci.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 05f9c6cc..a17cae42 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,6 +43,19 @@ test: script: - dotnet test + + +staging: + stage: staging + # only: + # - develop + needs: ["build"] + before_script: + - *nuget-fix + - dotnet restore + script: + - dotnet publish -p:PublishReadyToRun=true -p:m=8 -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 MP.Stats/MP.Stats.csproj + release: stage: release only: @@ -58,18 +71,6 @@ release: - -staging: - stage: staging - # only: - # - develop - needs: ["build"] - before_script: - - *nuget-fix - - dotnet restore - script: - - dotnet publish -p:PublishReadyToRun=true -p:m=8 -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 MP.Stats/MP.Stats.csproj - # BHS:staging: # stage: staging # rules: From 02c16b71e2cc557587c9397ec436731887995a69 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 26 May 2021 20:25:00 +0200 Subject: [PATCH 21/26] cambio sintassi pubblicazione --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a17cae42..12360450 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,12 +54,12 @@ staging: - *nuget-fix - dotnet restore script: - - dotnet publish -p:PublishReadyToRun=true -p:m=8 -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 MP.Stats/MP.Stats.csproj + - dotnet publish -p:PublishReadyToRun=true -p:m=8 -p:DeployOnBuild=true -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true -p:OutputPath=bin/ -verbosity:minimal MP.Stats/MP.Stats.csproj release: stage: release only: - - feature/Deploy_CI_CD + #- feature/Deploy_CI_CD - master needs: ["build"] artifacts: From 8ac1fbb721a84f0e7e9498c5a8e3179ef23a5f81 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 26 May 2021 20:26:14 +0200 Subject: [PATCH 22/26] refresh launch json --- .vscode/launch.json | 36 ++++++++++++++++++++++++++++++++++++ .vscode/tasks.json | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..fbfcb92d --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,36 @@ +{ + "version": "0.2.0", + "configurations": [ + { + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md + "name": ".NET Core Launch (web)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + // If you have changed target frameworks, make sure to update the program path. + "program": "${workspaceFolder}/MP.Stats/bin/Debug/net5.0/MP.Stats.dll", + "args": [], + "cwd": "${workspaceFolder}/MP.Stats", + "stopAtEntry": false, + // Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser + "serverReadyAction": { + "action": "openExternally", + "pattern": "\\bNow listening on:\\s+(https?://\\S+)" + }, + "env": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "sourceFileMap": { + "/Views": "${workspaceFolder}/Views" + } + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach", + "processId": "${command:pickProcess}" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..3d710101 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,42 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/MP.Stats/MP.Stats.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "publish", + "command": "dotnet", + "type": "process", + "args": [ + "publish", + "${workspaceFolder}/MP.Stats/MP.Stats.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "watch", + "command": "dotnet", + "type": "process", + "args": [ + "watch", + "run", + "${workspaceFolder}/MP.Stats/MP.Stats.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + } + ] +} \ No newline at end of file From 9aef411c5b61c7643e546ae787d554efd3f61f52 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 26 May 2021 20:28:01 +0200 Subject: [PATCH 23/26] ancora modifiche comando pubblicazione --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 12360450..4b4cadf5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,7 +54,7 @@ staging: - *nuget-fix - dotnet restore script: - - dotnet publish -p:PublishReadyToRun=true -p:m=8 -p:DeployOnBuild=true -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true -p:OutputPath=bin/ -verbosity:minimal 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 release: stage: release From f512067457df8a798ffb58c97152498efb02bc27 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 26 May 2021 20:30:37 +0200 Subject: [PATCH 24/26] ancora test x deploy --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4b4cadf5..5731f348 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,7 +54,8 @@ staging: - *nuget-fix - dotnet restore script: - - 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=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 release: stage: release From f6d4880308587f92cd484b7072dd6de2b97eb664 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 26 May 2021 20:33:09 +0200 Subject: [PATCH 25/26] update vers number x test deploy --- MP.Stats/MP.Stats.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MP.Stats/MP.Stats.csproj b/MP.Stats/MP.Stats.csproj index c373b569..e9250fe8 100644 --- a/MP.Stats/MP.Stats.csproj +++ b/MP.Stats/MP.Stats.csproj @@ -4,7 +4,7 @@ net5.0 MP.Stats 826e877c-ba70-4253-84cb-d0b1cafd4440 - 1.0.2105.2619 + 1.0.2105.2620 From cc6659b0a86d01064a3e0137acd42e3d102a1373 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 26 May 2021 20:42:34 +0200 Subject: [PATCH 26/26] 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"]