From a823bf8587dc3243cffcf87f233dfcbc53e87b60 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 1 Dec 2021 16:57:13 +0100 Subject: [PATCH] bozza yaml solo build --- .gitlab-ci.yml | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..c15b8df --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,88 @@ +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' +# NEXUS_PATH: 'MAPO/IOB-WIN-NEXT' + APP_NAME: 'IOB-WIN-NEXT' + VERS_MAIN: '3.6' + NEW_REL: '' + OUTPUT_DIR: '' + +# 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 https://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"$NEXUS_PASSWD`"" + } else { + C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source https://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"$NEXUS_PASSWD`"" + } + echo $hasSource + +# helper x fix version number +.version-fix: &version-fix + - | + $env:NEW_REL = $env:VERS_MAIN+"."+(get-date –format yyMM)+"."+(get-date –format ddHH) + $contenuto = Get-Content -path 'VersGen\VersGen.cs' -Raw + $newContenuto = $contenuto -replace '0.0.0.0', $env:NEW_REL + $newContenuto | Set-Content -Path 'VersGen\VersGen.cs' + echo "Set vers: $env:NEW_REL" + +stages: + - build + +Test-S7:build: + stage: build + tags: + - win + variables: + APP_NAME: Test-S7 + before_script: + - *nuget-fix + - '& "$env:NUGET_PATH" restore "$env:APP_NAME.sln"-verbosity quiet' + - *version-fix + script: + - '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=Release /p:Platform="x86" /p:OutputPath=bin/ /verbosity:minimal /m' + +Test-Beckhoff:build: + stage: build + tags: + - win + variables: + APP_NAME: Test-S7 + before_script: + - *nuget-fix + - '& "$env:NUGET_PATH" restore "$env:APP_NAME.sln"-verbosity quiet' + - *version-fix + script: + - '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=Release /p:Platform="x86" /p:OutputPath=bin/ /verbosity:minimal /m' + + Test-FileWatcher:build: + stage: build + tags: + - win + variables: + APP_NAME: Test-FileWatcher + before_script: + - *nuget-fix + - '& "$env:NUGET_PATH" restore "$env:APP_NAME.sln"-verbosity quiet' + - *version-fix + script: + - '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=Release /p:Platform="x86" /p:OutputPath=bin/ /verbosity:minimal /m' + + Test-OSAI:build: + stage: build + tags: + - win + variables: + APP_NAME: Test-OSAI + before_script: + - *nuget-fix + - '& "$env:NUGET_PATH" restore "$env:APP_NAME.sln"-verbosity quiet' + - *version-fix + script: + - '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=Release /p:Platform="x86" /p:OutputPath=bin/ /verbosity:minimal /m' + + \ No newline at end of file