From 5223f6f51976c4095b71223a0c9faa8aa17a136a Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 27 Sep 2021 19:07:10 +0200 Subject: [PATCH 1/6] Aggiunti enum ModBus x SDK --- MapoSDK/Enums.cs | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/MapoSDK/Enums.cs b/MapoSDK/Enums.cs index 63196da3..b84f5193 100644 --- a/MapoSDK/Enums.cs +++ b/MapoSDK/Enums.cs @@ -76,7 +76,27 @@ /// /// Tipo stringa /// - String + String, + + /// + /// ModBus Coil (booleano) - OUT R/W + /// + ModBusCoil, + + /// + /// ModBus Input discreto (booleano) - IN R + /// + ModBusDiscreteInput, + + /// + /// ModBus Holding Register (int[] convertibile a vari int/real) - OUT R/W + /// + ModBusHoldingRegister, + + /// + /// ModBus Input Register (int[] convertibile a vari int/real) - IN R + /// + ModBusInputRegister } /// From bff9829f1d1dd9de3d3aee96e1a8b6e440988b2d Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 27 Sep 2021 19:07:19 +0200 Subject: [PATCH 2/6] modifica yaml x ModBus + pubblicazione sdk --- .gitlab-ci.yml | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b0d741b1..d89ca442 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,6 +8,7 @@ variables: NEW_REL: '' NEXUS_PATH: 'MP-XXXX' APP_NAME: 'MP.Xxxx' + APP_CONF: 'Release' # helper x fix pacchetti nuget da repo locale nexus.steamware.net .nuget-fix: &nuget-fix @@ -69,19 +70,26 @@ variables: ForEach ($File in $File2Send) { $FileName = Split-Path $File -leaf echo "mCurl -s -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/$FileName" - mCurl -s -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/$FileName - + mCurl -s -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/$FileName echo "mCurl -s -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/ARCHIVE/$VersNumb/$FileName" mCurl -s -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/ARCHIVE/$VersNumb/$FileName } echo "mCurl -s -u GitLab:$NEXUS_PASSWD --upload-file $FileManOut https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/manifest.xml" mCurl -s -u GitLab:$NEXUS_PASSWD --upload-file $FileManOut https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/manifest.xml - echo "mCurl -s -u GitLab:$NEXUS_PASSWD --upload-file $FileCLogOut https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/ChangeLog.html" mCurl -s -u GitLab:$NEXUS_PASSWD --upload-file $FileCLogOut https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/ChangeLog.html - - +# helper x send su NEXUS di pack SDK in formato nuget +.sendSDK: &sendSDK + - | + Remove-Item *.nupkg + echo "C:\Tools\nuget.exe pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Version $env:NEW_REL"" + C:\Tools\nuget.exe pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Version $env:NEW_REL" + echo "Start upload with nuget push" + echo "C:\Tools\nuget.exe setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted" + C:\Tools\nuget.exe setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted + echo "C:\Tools\nuget.exe push MapoSDK.$env:NEW_REL.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted" + C:\Tools\nuget.exe push MapoSDK.$env:NEW_REL.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted # helper x fix version number .version-fix: &version-fix @@ -94,10 +102,32 @@ variables: stages: - build + - sdk - staging - deploy - installer + +SDK: + stage: sdk + tags: + - win + rules: + # - if: '$CI_COMMIT_BRANCH == "master"' + # when: manual + # - if: '$CI_COMMIT_BRANCH == "develop"' + - if: '$CI_COMMIT_BRANCH == "SDK"' + variables: + APP_NAME: MP-ADM + NEXUS_PATH: MP-ADM + before_script: + - *nuget-fix + - '& "$env:NUGET_PATH" restore MAPO.sln -verbosity quiet' + - *version-fix + script: + - '& "$env:MSBUILD_PATH" MapoSDK/MapoSDK.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/Release /verbosity:minimal /m' + - *sendSDK + ADM:build: stage: build variables: @@ -471,3 +501,4 @@ MAG:install: - *hashBuild - *nexusUpload needs: ["MAG:build"] + From d7437c970270e0cdc62e07d406825a5bbeb03f36 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 28 Sep 2021 08:02:02 +0200 Subject: [PATCH 3/6] update step SDK --- .gitlab-ci.yml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d89ca442..e9a19f19 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -83,7 +83,7 @@ variables: .sendSDK: &sendSDK - | Remove-Item *.nupkg - echo "C:\Tools\nuget.exe pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Version $env:NEW_REL"" + echo "C:\Tools\nuget.exe pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Version $env:NEW_REL" C:\Tools\nuget.exe pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Version $env:NEW_REL" echo "Start upload with nuget push" echo "C:\Tools\nuget.exe setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted" @@ -126,7 +126,16 @@ SDK: - *version-fix script: - '& "$env:MSBUILD_PATH" MapoSDK/MapoSDK.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/Release /verbosity:minimal /m' - - *sendSDK + - | + Remove-Item *.nupkg + echo "& $env:NUGET_PATH pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Version $env:NEW_REL" + & "$env:NUGET_PATH pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Version $env:NEW_REL" + echo "Start upload with nuget push" + echo "& $env:NUGET_PATH setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted" + & $env:NUGET_PATH setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted + echo "& $env:NUGET_PATH push MapoSDK.$env:NEW_REL.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted" + & $env:NUGET_PATH push MapoSDK.$env:NEW_REL.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted + # - *sendSDK ADM:build: stage: build @@ -134,6 +143,8 @@ ADM:build: CURR_PRJ: "MP-ADM" tags: - win + rules: + - if: '$CI_COMMIT_BRANCH != "SDK"' before_script: - *nuget-fix - '& "$env:NUGET_PATH" restore MAPO.sln -verbosity quiet' @@ -147,6 +158,8 @@ IO:build: CURR_PRJ: "MP-IO" tags: - win + rules: + - if: '$CI_COMMIT_BRANCH != "SDK"' before_script: - *nuget-fix - '& "$env:NUGET_PATH" restore MAPO.sln -verbosity quiet' @@ -161,6 +174,8 @@ SITE:build: CURR_PRJ: "MP-SITE" tags: - win + rules: + - if: '$CI_COMMIT_BRANCH != "SDK"' before_script: - *nuget-fix - '& "$env:NUGET_PATH" restore MAPO.sln -verbosity quiet' @@ -174,6 +189,8 @@ MON:build: CURR_PRJ: "MP-MON" tags: - win + rules: + - if: '$CI_COMMIT_BRANCH != "SDK"' before_script: - *nuget-fix - '& "$env:NUGET_PATH" restore MAPO.sln -verbosity quiet' @@ -187,6 +204,8 @@ TAB:build: CURR_PRJ: "MP-TAB" tags: - win + rules: + - if: '$CI_COMMIT_BRANCH != "SDK"' before_script: - *nuget-fix - '& "$env:NUGET_PATH" restore MAPO.sln -verbosity quiet' @@ -200,6 +219,8 @@ MAG:build: CURR_PRJ: "MP-MAG" tags: - win + rules: + - if: '$CI_COMMIT_BRANCH != "SDK"' before_script: - *nuget-fix - '& "$env:NUGET_PATH" restore MAPO.sln -verbosity quiet' From 4178beedfaa42647a2fff25756fbdb3ebe29034e Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 28 Sep 2021 08:05:54 +0200 Subject: [PATCH 4/6] ancora sintassi nuget --- .gitlab-ci.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e9a19f19..4d745aa6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -126,15 +126,10 @@ SDK: - *version-fix script: - '& "$env:MSBUILD_PATH" MapoSDK/MapoSDK.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/Release /verbosity:minimal /m' - - | - Remove-Item *.nupkg - echo "& $env:NUGET_PATH pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Version $env:NEW_REL" - & "$env:NUGET_PATH pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Version $env:NEW_REL" - echo "Start upload with nuget push" - echo "& $env:NUGET_PATH setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted" - & $env:NUGET_PATH setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted - echo "& $env:NUGET_PATH push MapoSDK.$env:NEW_REL.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted" - & $env:NUGET_PATH push MapoSDK.$env:NEW_REL.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted + - '& Remove-Item *.nupkg' + - '& $env:NUGET_PATH pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Version $env:NEW_REL' + - '& $env:NUGET_PATH setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted' + - '& $env:NUGET_PATH push MapoSDK.$env:NEW_REL.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted' # - *sendSDK ADM:build: From 83a849384c02b722343fea1b674139c07a26ed90 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 28 Sep 2021 08:10:42 +0200 Subject: [PATCH 5/6] sintassi alternativa --- .gitlab-ci.yml | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4d745aa6..ec2fc424 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -82,14 +82,11 @@ variables: # helper x send su NEXUS di pack SDK in formato nuget .sendSDK: &sendSDK - | - Remove-Item *.nupkg - echo "C:\Tools\nuget.exe pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Version $env:NEW_REL" - C:\Tools\nuget.exe pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Version $env:NEW_REL" - echo "Start upload with nuget push" - echo "C:\Tools\nuget.exe setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted" - C:\Tools\nuget.exe setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted - echo "C:\Tools\nuget.exe push MapoSDK.$env:NEW_REL.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted" - C:\Tools\nuget.exe push MapoSDK.$env:NEW_REL.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted + '& "$env:MSBUILD_PATH" MapoSDK/MapoSDK.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/Release /verbosity:minimal /m' + '& Remove-Item *.nupkg' + '& $env:NUGET_PATH pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Description="Mapo SDK helper library" -Author=EgalWare -Version $env:NEW_REL' + '& $env:NUGET_PATH setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted' + '& $env:NUGET_PATH push MapoSDK.$env:NEW_REL.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted' # helper x fix version number .version-fix: &version-fix @@ -125,12 +122,12 @@ SDK: - '& "$env:NUGET_PATH" restore MAPO.sln -verbosity quiet' - *version-fix script: - - '& "$env:MSBUILD_PATH" MapoSDK/MapoSDK.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/Release /verbosity:minimal /m' - - '& Remove-Item *.nupkg' - - '& $env:NUGET_PATH pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Version $env:NEW_REL' - - '& $env:NUGET_PATH setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted' - - '& $env:NUGET_PATH push MapoSDK.$env:NEW_REL.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted' - # - *sendSDK + # - '& "$env:MSBUILD_PATH" MapoSDK/MapoSDK.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/Release /verbosity:minimal /m' + # - '& Remove-Item *.nupkg' + # - '& $env:NUGET_PATH pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Description="Mapo SDK helper library" -Author=EgalWare -Version $env:NEW_REL' + # - '& $env:NUGET_PATH setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted' + # - '& $env:NUGET_PATH push MapoSDK.$env:NEW_REL.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted' + - *sendSDK ADM:build: stage: build From b44c7af7796153edca1bd839838e54e15563828d Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 28 Sep 2021 08:12:05 +0200 Subject: [PATCH 6/6] Cleanup codice yaml --- .gitlab-ci.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ec2fc424..6e3ebc71 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -110,9 +110,6 @@ SDK: tags: - win rules: - # - if: '$CI_COMMIT_BRANCH == "master"' - # when: manual - # - if: '$CI_COMMIT_BRANCH == "develop"' - if: '$CI_COMMIT_BRANCH == "SDK"' variables: APP_NAME: MP-ADM @@ -122,11 +119,6 @@ SDK: - '& "$env:NUGET_PATH" restore MAPO.sln -verbosity quiet' - *version-fix script: - # - '& "$env:MSBUILD_PATH" MapoSDK/MapoSDK.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/Release /verbosity:minimal /m' - # - '& Remove-Item *.nupkg' - # - '& $env:NUGET_PATH pack MapoSDK\MapoSDK.csproj -properties Configuration=$env:APP_CONF -Description="Mapo SDK helper library" -Author=EgalWare -Version $env:NEW_REL' - # - '& $env:NUGET_PATH setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source https://nexus.steamware.net/repository/nuget-hosted' - # - '& $env:NUGET_PATH push MapoSDK.$env:NEW_REL.nupkg -Source https://nexus.steamware.net/repository/nuget-hosted' - *sendSDK ADM:build: