From 78e22cf5adb5689c6450c1beabcf9c2bf4fcff00 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 24 Jul 2023 16:15:47 +0200 Subject: [PATCH 1/5] Aggiunti pubxml files --- SMGen/Properties/PublishProfiles/IIS01.pubxml | 26 +++++++++++++++++++ .../PublishProfiles/IIS01.pubxml.user | 13 ++++++++++ 2 files changed, 39 insertions(+) create mode 100644 SMGen/Properties/PublishProfiles/IIS01.pubxml create mode 100644 SMGen/Properties/PublishProfiles/IIS01.pubxml.user diff --git a/SMGen/Properties/PublishProfiles/IIS01.pubxml b/SMGen/Properties/PublishProfiles/IIS01.pubxml new file mode 100644 index 0000000..5058917 --- /dev/null +++ b/SMGen/Properties/PublishProfiles/IIS01.pubxml @@ -0,0 +1,26 @@ + + + + + MSDeploy + true + Release + Any CPU + https://iis01.egalware.com/MP/SMGEN/ + false + false + https://iis01.egalware.com:8172/MsDeploy.axd + Default Web Site/MP/SMGEN + + false + WMSVC + true + true + jenkins + <_SavePWD>true + <_TargetId>IISWebDeploy + net6.0 + + \ No newline at end of file diff --git a/SMGen/Properties/PublishProfiles/IIS01.pubxml.user b/SMGen/Properties/PublishProfiles/IIS01.pubxml.user new file mode 100644 index 0000000..3b2c371 --- /dev/null +++ b/SMGen/Properties/PublishProfiles/IIS01.pubxml.user @@ -0,0 +1,13 @@ + + + + + + AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAHBJL+AjnSkKKQcJBrmvYDwAAAAACAAAAAAADZgAAwAAAABAAAABEZeATgyzATbSQPONruxZ3AAAAAASAAACgAAAAEAAAAOUpb0A/7aezHDT3vKuP+soYAAAAPs13cFfi0CJUSv0cE5GdPLNFBpttx9LHFAAAAHna4yYnHTKs3srVf3z0EW0hjQZb + True|2023-07-24T14:12:23.8712346Z;True|2023-05-11T11:56:02.0835509+02:00;True|2023-05-11T11:03:19.0009531+02:00;True|2023-04-17T19:22:41.9460631+02:00; + + + \ No newline at end of file From 62fdd76bb45d44a8f929bf5c3e58342634fdc72e Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 24 Jul 2023 16:15:55 +0200 Subject: [PATCH 2/5] update x publish profiles --- SMGen/.config/dotnet-tools.json | 5 +++++ SMGen/SMGen.csproj | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 SMGen/.config/dotnet-tools.json diff --git a/SMGen/.config/dotnet-tools.json b/SMGen/.config/dotnet-tools.json new file mode 100644 index 0000000..b0e38ab --- /dev/null +++ b/SMGen/.config/dotnet-tools.json @@ -0,0 +1,5 @@ +{ + "version": 1, + "isRoot": true, + "tools": {} +} \ No newline at end of file diff --git a/SMGen/SMGen.csproj b/SMGen/SMGen.csproj index f3a17ea..2722125 100644 --- a/SMGen/SMGen.csproj +++ b/SMGen/SMGen.csproj @@ -10,8 +10,13 @@ + + <_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS01.pubxml" /> + + + From 6464dc89417fd15db2421ccc2d37d0e7f51184d0 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 24 Jul 2023 16:31:32 +0200 Subject: [PATCH 3/5] Aggiunto pubxml x IIS04 --- .../PublishProfiles/IIS-PROD.pubxml | 27 +++++++++++++++++++ .../PublishProfiles/IIS-PROD.pubxml.user | 12 +++++++++ 2 files changed, 39 insertions(+) create mode 100644 SMGen/Properties/PublishProfiles/IIS-PROD.pubxml create mode 100644 SMGen/Properties/PublishProfiles/IIS-PROD.pubxml.user diff --git a/SMGen/Properties/PublishProfiles/IIS-PROD.pubxml b/SMGen/Properties/PublishProfiles/IIS-PROD.pubxml new file mode 100644 index 0000000..d5934d3 --- /dev/null +++ b/SMGen/Properties/PublishProfiles/IIS-PROD.pubxml @@ -0,0 +1,27 @@ + + + + + MSDeploy + true + Release + Any CPU + https://seriate.egalware.com/WDC/UI/ + false + c2109e71-4eae-4167-9052-175123ccc2bc + false + https://iis04.egalware.com:8172/MsDeploy.axd + seriate.egalware.com/WDC/UI + + false + WMSVC + true + true + jenkins + <_SavePWD>true + <_TargetId>IISWebDeploy + net6.0 + + \ No newline at end of file diff --git a/SMGen/Properties/PublishProfiles/IIS-PROD.pubxml.user b/SMGen/Properties/PublishProfiles/IIS-PROD.pubxml.user new file mode 100644 index 0000000..e1df52b --- /dev/null +++ b/SMGen/Properties/PublishProfiles/IIS-PROD.pubxml.user @@ -0,0 +1,12 @@ + + + + + True|2023-05-22T13:35:59.9735292Z;False|2023-05-22T15:33:39.4808724+02:00;True|2023-05-11T17:36:48.1468628+02:00; + + + AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAHBJL+AjnSkKKQcJBrmvYDwAAAAACAAAAAAADZgAAwAAAABAAAABqHjtCI4r9HP4to5TPRtU/AAAAAASAAACgAAAAEAAAAGWTrj6ykvtUZnIZTp5COsMYAAAAHkol9Zhdo3QCFNYyIvyJViyIyNSW1oNCFAAAAEvXT2wDdsDBGFpVXvR5NVA172tk + + \ No newline at end of file From cd349877453ebf6b95d1d90ccd90c442e7ee7f70 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 24 Jul 2023 16:31:43 +0200 Subject: [PATCH 4/5] FIx generazione vers number --- Resources/LogoEgw.png | Bin 0 -> 3051 bytes Resources/MainVers.txt | 1 + Resources/VersNum.txt | 1 + SMGen/post-build.ps1 | 15 +++++++++++++++ 4 files changed, 17 insertions(+) create mode 100644 Resources/LogoEgw.png create mode 100644 Resources/MainVers.txt create mode 100644 Resources/VersNum.txt create mode 100644 SMGen/post-build.ps1 diff --git a/Resources/LogoEgw.png b/Resources/LogoEgw.png new file mode 100644 index 0000000000000000000000000000000000000000..8d5a7c1fa3da8f7edbd0edfaa5b299fee87505ec GIT binary patch literal 3051 zcmds3YgAKL8jbZq0hOT&S|Xr8u}TBhLKG1gPy(!$hk&>wMZknm@Cp@>M0up*R79|Z zN0qk<6lE}oH*hI0k%AC`BvJ@)3E@q6n1n|vhygO^I{)VH{Fyab>zLJ0< zR8!9^(m4?Qn{aUQZ9(Hmqd@c;m3n6KUk{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{-Su--9vS?5)1b0HQFz#>niIS)ZSNSAV^?Won$PoPWrQQGH7;XNEw+)ztFS*L zgscy8)rwF!K9K&MWuAY$UoN`zi*qU!i394ryYA5w;~r)c)(Kum$#a0D^WHVEai3>? z@>nhOy4{#WAj^S3KVrR9+6phqRloQm(p{6A%b*7$r&EXVHC)mmJXk-1n9skx_kj#?B`2y4YOz zt|QT|GM01zqzl=Cq2-3b0TO|le>69T zgPt9CL35KiUpv@6lJXkBzB~)IR?s+?TE7X7D&@5?CQD!&4vlg$(hn_k#c;(^K?(Z1 zQ{kEA5Iz(aNOwmc9^x$C5T6fDD(#}(Pr4eMMC$_Q8epegG)iKe16r)kL0^q!!On`{ z39%{zcKsGPhqUhu$Mo&_)!z?pthSB$F^X7kneQ7DiaNyqZ_#l@s?yVV&>@@zqA>=(^eT+?JI<9~B#;H*cjt`6kT5#~DHMk)9S8t~si zB3e^3PZM4L4~BV8<8%8PIM~%F&*VP`-gHxh`Sk}fVam!z&6;}YvN^t$<@QEYqf-0+ Y*WH$Z+O?m9KczTVC->78j)95)0#(IYY5)KL literal 0 HcmV?d00001 diff --git a/Resources/MainVers.txt b/Resources/MainVers.txt new file mode 100644 index 0000000..3e205f2 --- /dev/null +++ b/Resources/MainVers.txt @@ -0,0 +1 @@ +0.8. diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt new file mode 100644 index 0000000..22a1406 --- /dev/null +++ b/Resources/VersNum.txt @@ -0,0 +1 @@ +0.8.2307.2416 diff --git a/SMGen/post-build.ps1 b/SMGen/post-build.ps1 new file mode 100644 index 0000000..13e8b26 --- /dev/null +++ b/SMGen/post-build.ps1 @@ -0,0 +1,15 @@ +param([string]$ProjectDir, [string]$ProjectPath); + +$MainVers="..\Resources\MainVers.txt" +$FileVers="..\Resources\VersNum.txt" +$MajMin=Get-Content $MainVers +$currentDate = get-date -format yyMM; +$currentTime = get-date -format ddHH; +$find = "(.|\n)*?"; +$currRelNum=$MajMin + $currentDate +"." + $currentTime +$replace = "" + $MajMin + $currentDate +"." + $currentTime + ""; +$csproj = Get-Content $ProjectPath +$csprojUpdated = $csproj -replace $find, $replace + +Set-Content -Path $ProjectPath -Value $csprojUpdated +Set-Content -Path $FileVers -Value $currRelNum From da26f57e75cb486147c96948dd0db29d38eaff85 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 24 Jul 2023 16:31:57 +0200 Subject: [PATCH 5/5] Aggiunta preliminare CI/CD --- .gitlab-ci.yml | 87 +++++++++++++++++++ .../PublishProfiles/IIS-PROD.pubxml | 5 +- .../PublishProfiles/IIS-PROD.pubxml.user | 2 +- SMGen/SMGen.csproj | 7 ++ 4 files changed, 97 insertions(+), 4 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..5903778 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,87 @@ +variables: + VERS_MAIN: '0.9' + NEW_REL: '' + APP_NAME: 'SMGen' + SOL_NAME: 'SMGen' + +# helper x fix pacchetti nuget da repo locale nexus.steamware.net +.nuget-fix: &nuget-fix + - | + echo "esecuzione Nuget FIX steps" + dotnet nuget list source + $hasSource = dotnet nuget list source | Select-String -Pattern "Steamware Nexus Proxy" + if (! [String]::IsNullOrWhiteSpace($hasSource)) { + dotnet nuget remove source "`"Steamware Nexus Proxy`"" + } + $hasSource = dotnet nuget list source | Select-String -Pattern "Steamware Nexus" + if (! [String]::IsNullOrWhiteSpace($hasSource)) { + dotnet nuget remove source "`"Steamware Nexus`"" + } + $hasSource = dotnet nuget list source | Select-String -Pattern "nexus-proxy-v3" + if (! [String]::IsNullOrWhiteSpace($hasSource)) { + dotnet nuget remove source nexus-proxy-v3 + } + dotnet nuget add source https://nexus.steamware.net/repository/nuget-group-3/index.json -n "Steamware Nexus" -u nugetUser -p $NEXUS_PASSWD --store-password-in-clear-text + echo "Steamware Nexus Source added" + + + +stages: + - build + - staging + - deploy + +# ---------- BUILD ---------- +SMGen:build: + stage: build + tags: + - win + variables: + APP_NAME: SMGen + SOL_NAME: SMGen + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" + script: + - dotnet build $env:APP_NAME/$env:APP_NAME.csproj + + +# ---------- STAGING ---------- +SMGen:staging: + stage: staging + tags: + - win + variables: + APP_NAME: SMGen + SOL_NAME: SMGen + only: + - develop + needs: ["SMGen:build"] + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" + script: + - dotnet build $env:APP_NAME/$env:APP_NAME.csproj + - dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj + +# ---------- DEPLOY ---------- +SMGen:deploy: + stage: deploy + tags: + - win + environment: + name: production + url: https://office.egalware.com/MP/SMGEN + variables: + APP_NAME: SMGen + SOL_NAME: SMGen + only: + - main + needs: ["SMGen:build"] + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" + script: + - dotnet build $env:APP_NAME/$env:APP_NAME.csproj + # IIS PROD + - dotnet publish -p:PublishProfile=IIS-PROD.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj diff --git a/SMGen/Properties/PublishProfiles/IIS-PROD.pubxml b/SMGen/Properties/PublishProfiles/IIS-PROD.pubxml index d5934d3..65cbd9c 100644 --- a/SMGen/Properties/PublishProfiles/IIS-PROD.pubxml +++ b/SMGen/Properties/PublishProfiles/IIS-PROD.pubxml @@ -8,12 +8,11 @@ https://go.microsoft.com/fwlink/?LinkID=208121. true Release Any CPU - https://seriate.egalware.com/WDC/UI/ + https://office.egalware.com/MP/SMGEN/ false - c2109e71-4eae-4167-9052-175123ccc2bc false https://iis04.egalware.com:8172/MsDeploy.axd - seriate.egalware.com/WDC/UI + office.egalware.com/MP/SMGEN false WMSVC diff --git a/SMGen/Properties/PublishProfiles/IIS-PROD.pubxml.user b/SMGen/Properties/PublishProfiles/IIS-PROD.pubxml.user index e1df52b..8ed7f0e 100644 --- a/SMGen/Properties/PublishProfiles/IIS-PROD.pubxml.user +++ b/SMGen/Properties/PublishProfiles/IIS-PROD.pubxml.user @@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. --> - True|2023-05-22T13:35:59.9735292Z;False|2023-05-22T15:33:39.4808724+02:00;True|2023-05-11T17:36:48.1468628+02:00; + True|2023-07-24T14:24:14.2770302Z;True|2023-07-24T16:23:20.6455643+02:00;True|2023-05-22T15:35:59.9735292+02:00;False|2023-05-22T15:33:39.4808724+02:00;True|2023-05-11T17:36:48.1468628+02:00; AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAHBJL+AjnSkKKQcJBrmvYDwAAAAACAAAAAAADZgAAwAAAABAAAABqHjtCI4r9HP4to5TPRtU/AAAAAASAAACgAAAAEAAAAGWTrj6ykvtUZnIZTp5COsMYAAAAHkol9Zhdo3QCFNYyIvyJViyIyNSW1oNCFAAAAEvXT2wDdsDBGFpVXvR5NVA172tk diff --git a/SMGen/SMGen.csproj b/SMGen/SMGen.csproj index 2722125..f5e9a24 100644 --- a/SMGen/SMGen.csproj +++ b/SMGen/SMGen.csproj @@ -4,6 +4,8 @@ net6.0 enable enable + State Machine Generator + 0.8.2307.2416 @@ -16,7 +18,12 @@ + + + + +