From d7437c970270e0cdc62e07d406825a5bbeb03f36 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 28 Sep 2021 08:02:02 +0200 Subject: [PATCH 1/4] 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 2/4] 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 3/4] 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 4/4] 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: