From e3f9f534da8c405c1529c9a18e11faf45c169419 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 15 Sep 2021 17:12:05 +0200 Subject: [PATCH 1/4] Introduzione Tag Search --- MP.Prog/Components/ArchiveStatus.razor | 2 +- MP.Prog/Components/TagSearch.razor | 36 ++++++ MP.Prog/Components/TagSearch.razor.cs | 141 ++++++++++++++++++++++ MP.Prog/Data/FileArchDataService.cs | 159 +++++++++++++------------ MP.Prog/Pages/Archive.razor | 34 +++++- MP.Prog/Pages/Archive.razor.cs | 24 ++++ MP.Prog/Pages/Test.razor | 26 ++++ 7 files changed, 342 insertions(+), 80 deletions(-) create mode 100644 MP.Prog/Components/TagSearch.razor create mode 100644 MP.Prog/Components/TagSearch.razor.cs create mode 100644 MP.Prog/Pages/Test.razor diff --git a/MP.Prog/Components/ArchiveStatus.razor b/MP.Prog/Components/ArchiveStatus.razor index 8fa1a2f8..2a8f5230 100644 --- a/MP.Prog/Components/ArchiveStatus.razor +++ b/MP.Prog/Components/ArchiveStatus.razor @@ -1,6 +1,6 @@ 
-
diff --git a/MP.Prog/Components/TagSearch.razor b/MP.Prog/Components/TagSearch.razor new file mode 100644 index 00000000..d1bf7e85 --- /dev/null +++ b/MP.Prog/Components/TagSearch.razor @@ -0,0 +1,36 @@ + \ No newline at end of file diff --git a/MP.Prog/Components/TagSearch.razor.cs b/MP.Prog/Components/TagSearch.razor.cs new file mode 100644 index 00000000..573da33f --- /dev/null +++ b/MP.Prog/Components/TagSearch.razor.cs @@ -0,0 +1,141 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; +using MP.FileData.DatabaseModels; +using MP.Prog; +using MP.Prog.Data; + +namespace MP.Prog.Components +{ + public partial class TagSearch + { + #region Protected Fields + + protected string _SearchTag; + protected string defTag = "###"; + + protected string LastSelTag = ""; + + #endregion Protected Fields + + #region Protected Properties + + [Inject] + protected MessageService AppMService { get; set; } + + [Inject] + protected FileArchDataService DataService { get; set; } + + protected string SearchTag + { + get + { + return _SearchTag; + } + set + { + _SearchTag = value; + // se son > 3 char... debounce... + if (string.IsNullOrEmpty(value)) + { + _SearchTag = defTag; + } + if (value.Length >= defTag.Length) + { + var pUpd = Task.Run(async () => + { + TagList = await DataService.TagGetSearch(_SearchTag, 50); + }); + pUpd.Wait(); + } + } + } + + protected List TagList { get; set; } = new List(); + + #endregion Protected Properties + + #region Public Properties + + [Parameter] + public EventCallback OnClose { get; set; } + + [Parameter] + public EventCallback searchUpdated { get; set; } + + [Parameter] + public string SelTag + { + get + { + string answ = ""; + if (AppMService.File_Filter != null) + { + answ = AppMService.File_Filter.Tag; + } + return answ; + } + set + { + if (!AppMService.File_Filter.Tag.Equals(value)) + { + AppMService.File_Filter.Tag = value; + } + reportChange(); + } + } + + [Parameter] + public string Text { get; set; } + + [Parameter] + public string Title { get; set; } + + #endregion Public Properties + + #region Private Methods + + private Task ModalCancel() + { + // resetto ricerca + SelTag = LastSelTag; + return OnClose.InvokeAsync(false); + } + + private Task ModalOk() + { + return OnClose.InvokeAsync(true); + } + + private void reportChange() + { + searchUpdated.InvokeAsync(SelTag); + } + + #endregion Private Methods + + #region Protected Methods + + protected override async Task OnInitializedAsync() + { + LastSelTag = SelTag; + await ReloadAllData(); + _SearchTag = defTag; + } + + protected async Task ReloadAllData() + { + SelTag = defTag; + TagList = await DataService.TagGetSearch(SearchTag, 20); + } + + protected async Task ResetSearchTag() + { + SearchTag = defTag; + } + + #endregion Protected Methods + } +} \ No newline at end of file diff --git a/MP.Prog/Data/FileArchDataService.cs b/MP.Prog/Data/FileArchDataService.cs index 47982bb4..6e8005e2 100644 --- a/MP.Prog/Data/FileArchDataService.cs +++ b/MP.Prog/Data/FileArchDataService.cs @@ -135,80 +135,6 @@ namespace MP.Prog.Data #endregion Internal Methods -#if false - protected string getCacheKey(string TableName, SelectData CurrFilter) - { - string answ = $"{TableName}:M_{CurrFilter.IdxMacchina}:A_{CurrFilter.CodArticolo}:K_{CurrFilter.KeyRichiesta}:O_{CurrFilter.IdxOdl}:D_{CurrFilter.DateStart:yyyyMMddHHmm}_{CurrFilter.DateEnd:yyyyMMddHHmm}"; - return answ; - } - - protected string getCacheKeyPaged(string TableName, SelectData CurrFilter) - { - string answ = $"{TableName}:M_{CurrFilter.IdxMacchina}:A_{CurrFilter.CodArticolo}:K_{CurrFilter.KeyRichiesta}:O_{CurrFilter.IdxOdl}:D_{CurrFilter.DateStart:yyMMddHHmm}_{CurrFilter.DateEnd:yyMMddHHmm}:R_{CurrFilter.FirstRecord}_{CurrFilter.FirstRecord + CurrFilter.NumRecord}"; - return answ; - } -#endif - -#if false - public async Task> ActionsGetAll() - { - //return Task.FromResult(dbController.ActionsGetAll()); - List dbResult = new List(); - string cacheKey = "MP:STATS:AZIONI_ALL"; - string rawData; - var redisDataList = await distributedCache.GetAsync(cacheKey); - if (redisDataList != null) - { - rawData = Encoding.UTF8.GetString(redisDataList); - dbResult = JsonConvert.DeserializeObject>(rawData); - } - 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); - } - - public Task> ArticoliGetSearch(int numRecord, string searchVal = "") - { - List answ = new List(); - answ.Add(new AutocompleteModel { LabelField = "--- TUTTE ---", ValueField = "*" }); - if (numRecord > -1) - { - answ.AddRange(dbController.ArticoliGetSearch(numRecord, searchVal).Select(x => new AutocompleteModel { LabelField = $"{x.CodArticolo} {x.DescArticolo} {x.Disegno}", ValueField = x.CodArticolo }).ToList()); - } - return Task.FromResult(answ); - } - - public async Task> ArticoliList(string searchVal) - { - List answ = new List(); - answ.Add(new AutocompleteModel { LabelField = "--- TUTTE ---", ValueField = "*" }); - var listMacchine = dbController.MacchineGetAll(); - answ.AddRange(listMacchine.Select(x => new AutocompleteModel { LabelField = x.IdxMacchina, ValueField = x.IdxMacchina }).ToList()); - return await Task.FromResult(answ); - } - - public Task> CommesseGetSearch(int numRecord, string searchVal = "") - { - List answ = new List(); - answ.Add(new AutocompleteModel { LabelField = "--- TUTTE ---", ValueField = "*" }); - if (numRecord > -1) - { - answ.AddRange(dbController.CommesseGetSearch(numRecord, searchVal).GroupBy(x => x.KeyRichiesta).Select(x => new AutocompleteModel { LabelField = $"{x.First().CodArticolo} | {x.First().KeyRichiesta}", ValueField = x.First().KeyRichiesta }).ToList()); - } - return Task.FromResult(answ); - } -#endif - #region Public Methods public void Dispose() @@ -287,6 +213,91 @@ namespace MP.Prog.Data return await Task.FromResult(dbController.TagGetFilt(SearchVal, 200).ToList()); } + public Task> TagGetSearch(string searchVal, int numRecord) + { + List answ = new List(); + answ.Add(new AutocompleteModel { LabelField = "--- TUTTE ---", ValueField = "*" }); + if (numRecord > -1) + { + answ.AddRange(dbController.TagGetFilt(searchVal, numRecord).Select(x => new AutocompleteModel { LabelField = $"{x.TagId}", ValueField = x.TagId }).ToList()); + } + return Task.FromResult(answ); + } + +#if false + protected string getCacheKey(string TableName, SelectData CurrFilter) + { + string answ = $"{TableName}:M_{CurrFilter.IdxMacchina}:A_{CurrFilter.CodArticolo}:K_{CurrFilter.KeyRichiesta}:O_{CurrFilter.IdxOdl}:D_{CurrFilter.DateStart:yyyyMMddHHmm}_{CurrFilter.DateEnd:yyyyMMddHHmm}"; + return answ; + } + + protected string getCacheKeyPaged(string TableName, SelectData CurrFilter) + { + string answ = $"{TableName}:M_{CurrFilter.IdxMacchina}:A_{CurrFilter.CodArticolo}:K_{CurrFilter.KeyRichiesta}:O_{CurrFilter.IdxOdl}:D_{CurrFilter.DateStart:yyMMddHHmm}_{CurrFilter.DateEnd:yyMMddHHmm}:R_{CurrFilter.FirstRecord}_{CurrFilter.FirstRecord + CurrFilter.NumRecord}"; + return answ; + } +#endif + +#if false + public async Task> ActionsGetAll() + { + //return Task.FromResult(dbController.ActionsGetAll()); + List dbResult = new List(); + string cacheKey = "MP:STATS:AZIONI_ALL"; + string rawData; + var redisDataList = await distributedCache.GetAsync(cacheKey); + if (redisDataList != null) + { + rawData = Encoding.UTF8.GetString(redisDataList); + dbResult = JsonConvert.DeserializeObject>(rawData); + } + 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); + } + + public Task> ArticoliGetSearch(int numRecord, string searchVal = "") + { + List answ = new List(); + answ.Add(new AutocompleteModel { LabelField = "--- TUTTE ---", ValueField = "*" }); + if (numRecord > -1) + { + answ.AddRange(dbController.ArticoliGetSearch(numRecord, searchVal).Select(x => new AutocompleteModel { LabelField = $"{x.CodArticolo} {x.DescArticolo} {x.Disegno}", ValueField = x.CodArticolo }).ToList()); + } + return Task.FromResult(answ); + } + + public async Task> ArticoliList(string searchVal) + { + List answ = new List(); + answ.Add(new AutocompleteModel { LabelField = "--- TUTTE ---", ValueField = "*" }); + var listMacchine = dbController.MacchineGetAll(); + answ.AddRange(listMacchine.Select(x => new AutocompleteModel { LabelField = x.IdxMacchina, ValueField = x.IdxMacchina }).ToList()); + return await Task.FromResult(answ); + } + + public Task> CommesseGetSearch(int numRecord, string searchVal = "") + { + List answ = new List(); + answ.Add(new AutocompleteModel { LabelField = "--- TUTTE ---", ValueField = "*" }); + if (numRecord > -1) + { + answ.AddRange(dbController.CommesseGetSearch(numRecord, searchVal).GroupBy(x => x.KeyRichiesta).Select(x => new AutocompleteModel { LabelField = $"{x.First().CodArticolo} | {x.First().KeyRichiesta}", ValueField = x.First().KeyRichiesta }).ToList()); + } + return Task.FromResult(answ); + } +#endif + /// /// Aggiorna intero archivio scansionando dati x tutte le macchine che hanno un path valido /// diff --git a/MP.Prog/Pages/Archive.razor b/MP.Prog/Pages/Archive.razor index d6f94a7e..20bbd1f1 100644 --- a/MP.Prog/Pages/Archive.razor +++ b/MP.Prog/Pages/Archive.razor @@ -5,7 +5,7 @@
-
+

Elenco Programmi

@@ -19,7 +19,7 @@
-
+
@@ -75,9 +75,32 @@ }
- @if (!string.IsNullOrEmpty(SelTag)) +
+
+ + Tags +
+
+ @if (!string.IsNullOrEmpty(SelTag)) + { + @SelTag + } + else + { +   ...   + } +
+
+ +
+
+ @if (DeleteDialogOpen) { - @SelTag + }
@@ -113,6 +136,7 @@ Tags Modificato @*Controllo*@ + @@ -148,7 +172,7 @@
@((((double)record.Size)/1024).ToString("N2")) k
- + @record.DiskStatus diff --git a/MP.Prog/Pages/Archive.razor.cs b/MP.Prog/Pages/Archive.razor.cs index ba0e0596..4c665142 100644 --- a/MP.Prog/Pages/Archive.razor.cs +++ b/MP.Prog/Pages/Archive.razor.cs @@ -255,6 +255,12 @@ namespace MP.Prog.Pages #endregion Protected Properties + #region Public Properties + + public bool DeleteDialogOpen { get; set; } + + #endregion Public Properties + #region Private Methods private string cssActive(bool active) @@ -288,6 +294,19 @@ namespace MP.Prog.Pages return answ; } + private async Task OnDialogClose(bool accepted) + { + DeleteDialogOpen = false; + await AsyncReload(); + StateHasChanged(); + } + + private void OpenDialog() + { + DeleteDialogOpen = true; + StateHasChanged(); + } + #endregion Private Methods #region Protected Methods @@ -463,6 +482,11 @@ namespace MP.Prog.Pages }); } + public void ResetTag() + { + SelTag = ""; + } + #endregion Public Methods } } \ No newline at end of file diff --git a/MP.Prog/Pages/Test.razor b/MP.Prog/Pages/Test.razor new file mode 100644 index 00000000..c3c4645d --- /dev/null +++ b/MP.Prog/Pages/Test.razor @@ -0,0 +1,26 @@ +@page "/Test" + +

Test

+ +@if (DeleteDialogOpen) +{ + +} + + + +@code { + public bool DeleteDialogOpen { get; set; } + private async Task OnDialogClose(bool accepted) + { + DeleteDialogOpen = false; + StateHasChanged(); + } + private void OpenDialog() + { + DeleteDialogOpen = true; + StateHasChanged(); + } +} \ No newline at end of file From cf2f9de185771714e1e637fb7b80dfc92133da67 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 15 Sep 2021 18:08:53 +0200 Subject: [PATCH 2/4] aggiunta publish profile prog --- .../PublishProfiles/FolderProfile.pubxml | 16 +++++++++++ .../Properties/PublishProfiles/IIS01.pubxml | 28 +++++++++++++++++++ .../Properties/PublishProfiles/IIS02.pubxml | 27 ++++++++++++++++++ .../PublishProfiles/IISProfile.pubxml | 21 ++++++++++++++ .../W2019-IIS-DEVProfile.pubxml | 27 ++++++++++++++++++ 5 files changed, 119 insertions(+) create mode 100644 MP.Prog/Properties/PublishProfiles/FolderProfile.pubxml create mode 100644 MP.Prog/Properties/PublishProfiles/IIS01.pubxml create mode 100644 MP.Prog/Properties/PublishProfiles/IIS02.pubxml create mode 100644 MP.Prog/Properties/PublishProfiles/IISProfile.pubxml create mode 100644 MP.Prog/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml diff --git a/MP.Prog/Properties/PublishProfiles/FolderProfile.pubxml b/MP.Prog/Properties/PublishProfiles/FolderProfile.pubxml new file mode 100644 index 00000000..cb2062ae --- /dev/null +++ b/MP.Prog/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.Prog/Properties/PublishProfiles/IIS01.pubxml b/MP.Prog/Properties/PublishProfiles/IIS01.pubxml new file mode 100644 index 00000000..8770d4a4 --- /dev/null +++ b/MP.Prog/Properties/PublishProfiles/IIS01.pubxml @@ -0,0 +1,28 @@ + + + + + MSDeploy + True + Release + Any CPU + + + False + d9901b50-e61c-400c-b62c-fa060cf72c29 + false + https://IIS01:8172/MsDeploy.axd + Default Web Site/MP/PROG + + False + WMSVC + True + jenkins + <_SavePWD>True + net5.0 + True + + \ No newline at end of file diff --git a/MP.Prog/Properties/PublishProfiles/IIS02.pubxml b/MP.Prog/Properties/PublishProfiles/IIS02.pubxml new file mode 100644 index 00000000..3f2c9acb --- /dev/null +++ b/MP.Prog/Properties/PublishProfiles/IIS02.pubxml @@ -0,0 +1,27 @@ + + + + + MSDeploy + True + Release + Any CPU + + + False + d9901b50-e61c-400c-b62c-fa060cf72c29 + false + https://IIS02:8172/MsDeploy.axd + Default Web Site/MP/STATS + + False + WMSVC + True + jenkins + <_SavePWD>True + net5.0 + + \ No newline at end of file diff --git a/MP.Prog/Properties/PublishProfiles/IISProfile.pubxml b/MP.Prog/Properties/PublishProfiles/IISProfile.pubxml new file mode 100644 index 00000000..7159a5db --- /dev/null +++ b/MP.Prog/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.Prog/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml b/MP.Prog/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml new file mode 100644 index 00000000..6b790904 --- /dev/null +++ b/MP.Prog/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml @@ -0,0 +1,27 @@ + + + + + MSDeploy + True + Release + Any CPU + + + False + d9901b50-e61c-400c-b62c-fa060cf72c29 + false + https://w2019-iis-dev:8172/MsDeploy.axd + Default Web Site/MP/STATS + + False + WMSVC + True + jenkins + <_SavePWD>True + net5.0 + + \ No newline at end of file From 5600427d71555576c7228f1751db7549dd429d6e Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 15 Sep 2021 18:09:09 +0200 Subject: [PATCH 3/4] Update file pubblicazione --- MP.Prog/.config/dotnet-tools.json | 5 +++ .../Properties/PublishProfiles/IIS02.pubxml | 40 +++++++++---------- .../PublishProfiles/IISProfile.pubxml | 30 +++++++------- .../W2019-IIS-DEVProfile.pubxml | 2 +- 4 files changed, 41 insertions(+), 36 deletions(-) create mode 100644 MP.Prog/.config/dotnet-tools.json diff --git a/MP.Prog/.config/dotnet-tools.json b/MP.Prog/.config/dotnet-tools.json new file mode 100644 index 00000000..b0e38abd --- /dev/null +++ b/MP.Prog/.config/dotnet-tools.json @@ -0,0 +1,5 @@ +{ + "version": 1, + "isRoot": true, + "tools": {} +} \ No newline at end of file diff --git a/MP.Prog/Properties/PublishProfiles/IIS02.pubxml b/MP.Prog/Properties/PublishProfiles/IIS02.pubxml index 3f2c9acb..414f1262 100644 --- a/MP.Prog/Properties/PublishProfiles/IIS02.pubxml +++ b/MP.Prog/Properties/PublishProfiles/IIS02.pubxml @@ -4,24 +4,24 @@ This file is used by the publish/package process of your Web project. You can cu by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121. --> - - MSDeploy - True - Release - Any CPU - - - False - d9901b50-e61c-400c-b62c-fa060cf72c29 - false - https://IIS02:8172/MsDeploy.axd - Default Web Site/MP/STATS - - False - WMSVC - True - jenkins - <_SavePWD>True - net5.0 - + + MSDeploy + True + Release + Any CPU + + + False + d9901b50-e61c-400c-b62c-fa060cf72c29 + false + https://IIS02:8172/MsDeploy.axd + Default Web Site/MP/PROG + + False + WMSVC + True + jenkins + <_SavePWD>True + net5.0 + \ No newline at end of file diff --git a/MP.Prog/Properties/PublishProfiles/IISProfile.pubxml b/MP.Prog/Properties/PublishProfiles/IISProfile.pubxml index 7159a5db..ac1eb81f 100644 --- a/MP.Prog/Properties/PublishProfiles/IISProfile.pubxml +++ b/MP.Prog/Properties/PublishProfiles/IISProfile.pubxml @@ -1,21 +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 - + + Package + Release + Any CPU + + True + False + d9901b50-e61c-400c-b62c-fa060cf72c29 + bin\publish\MP.Prog.zip + true + Default Web Site/MP/PROG + net5.0 + false + \ No newline at end of file diff --git a/MP.Prog/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml b/MP.Prog/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml index 6b790904..e4965fb0 100644 --- a/MP.Prog/Properties/PublishProfiles/W2019-IIS-DEVProfile.pubxml +++ b/MP.Prog/Properties/PublishProfiles/W2019-IIS-DEVProfile.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://w2019-iis-dev:8172/MsDeploy.axd - Default Web Site/MP/STATS + Default Web Site/MP/PROG False WMSVC From fea8d06a12a31391c551b6f70c067b3d5ad1f266 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 15 Sep 2021 18:09:21 +0200 Subject: [PATCH 4/4] test yaml gitlab --- .gitlab-ci.yml | 55 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9aecf6ee..771c7769 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,12 @@ 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' -# NEW_REL: '' - VERS_MAIN: '1.0' - NEXUS_PATH: 'MP-STATS' - APP_NAME: 'MP.Stats' + 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\MP-CORE\Release' + DEPLOY_FOLDER: 'c:\Projects\Deploy\MP-CORE\Builds' + VERS_MAIN: '1.1' + NEXUS_PATH: 'MP-STATS' + APP_NAME: 'MP.Stats' # helper x fix pacchetti nuget da repo locale nexus.steamware.net .nuget-fix: &nuget-fix @@ -74,9 +73,11 @@ build: - win before_script: - *nuget-fix - - dotnet restore + - dotnet restore MP-STATS.sln + - dotnet restore MP-PROG.sln script: - - dotnet build + - dotnet build MP.Stats/MP.Stats.csproj + - dotnet build MP.Prog/MP.Prog.csproj test: stage: test @@ -86,7 +87,8 @@ test: - develop needs: ["build"] script: - - dotnet test + - dotnet test MP.Stats/MP.Stats.csproj + - dotnet test MP.Prog/MP.Prog.csproj IIS01:deploy: stage: deploy @@ -100,6 +102,7 @@ IIS01:deploy: # - 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:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Prog/MP.Prog.csproj IIS02:deploy: @@ -115,8 +118,10 @@ IIS02:deploy: script: - 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 + - dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Prog/MP.Prog.csproj + - dotnet publish -p:PublishProfile=W2019-IIS-DEVProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Prog/MP.Prog.csproj -installer: +STA:installer: stage: installer tags: - win @@ -124,6 +129,9 @@ installer: - develop - master needs: ["build"] + variables: + APP_NAME: MP-STATS + ZIP_NAME: STATS before_script: # - *nuget-fix # - dotnet restore @@ -132,6 +140,26 @@ installer: # qui il deploy su nexus... - *hashBuild - *nexusUpload + +STA:installer: + stage: installer + tags: + - win + only: + - develop + - master + needs: ["build"] + variables: + APP_NAME: MP-PROG + ZIP_NAME: PROG + before_script: + # - *nuget-fix + # - dotnet restore + script: + - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release MP.Prog/MP.Prog.csproj -o:publish + # qui il deploy su nexus... + - *hashBuild + - *nexusUpload release: stage: release @@ -149,5 +177,6 @@ release: - publish/ script: - dotnet publish -c Release -o ./publish MP.Stats/MP.Stats.csproj + - dotnet publish -c Release -o ./publish MP.Prog/MP.Prog.csproj