commit 2fed27a9422f731a9b3138f9058219a6756cc210
Author: Milan Hotovec <milanhotovec@seznam.cz>
Date:   Mon Apr 5 21:45:30 2021 +0200

    Initial Build and test config
    @testFull

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ec07481..2af3225 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,89 +1,129 @@
 #CI_COMMIT_MESSAGE is header and description
 #Only childs are ANDed and child restrictions are ORed
 variables:
-  NUGET_PATH: "C:\\Tools\\Nuget\\nuget.exe"
-  MSBUILD_PATH: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe"
   VSTEST_PATH: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\Common7\\IDE\\CommonExtensions\\Microsoft\\TestWindow\\vstest.console.exe"
   RELEASE_FOLDER: "C:\\Users\\cztestman01\\OneDrive - Leuze electronic GmbH + Co. KG\\00_BUILDS\\DummyProject"
 stages:
   - build
   - test
-  - release
+#  - release
 before_script:
-    - 'echo "Execution time" (Get-Date).ToString("yyyy_MM_dd-HH_mm_ss")' # Current time
-    - 'cd .\DummyProject'                    #Change directory to lowest same working directory
-    - '& "$NUGET_PATH" restore'                #Before all restore packages
-#Job for building
-build_job:
+    - 'echo "Execution time"' # Current time
+    - 'date'
+#Job for building on windows
+build_job_windows:
   stage: build
   tags:
-    - csharp
-    - win10
+    - dotnet
+    - windows10
   only:
     refs:
       - branches
     variables:
+      - $CI_COMMIT_MESSAGE =~ /@build/i                       #manual trigger for building
       - $CI_COMMIT_MESSAGE =~ /@test/i                        #manual trigger for testing
       - $CI_COMMIT_MESSAGE =~ /@deploy/i                      #manual trigger for deploy
       - $CI_COMMIT_MESSAGE =~ /See merge request/             #auto trigger for merge requests from GitLab
       - $CI_COMMIT_MESSAGE =~ /merge branch/i                 #auto trigger for merge requests from command
       - $CI_COMMIT_MESSAGE =~ /Merge remote-tracking branch/i #auto trigger for remote merge requests from command
   script:
-    - '& "$MSBUILD_PATH" /p:Platform=x64'                               #Build project
-    - '& "$MSBUILD_PATH" /p:Configuration="Release" /p:Platform=x64'   #Build project
+    - 'dotnet build'                               #Build project
   artifacts:
     expire_in: 2 days
     paths:
-      - '.\DummyProject\DummyProject\bin\'            #Upload all builds as artifact
-      - '.\DummyProject\CalcTests\bin\'               #Upload all builds as artifact
-#Job for testing
-test_job:
+      - '.\src\Presentation\Leuze.App\bin\Debug\net5.0'            #Upload all builds as artifact
+      - '.\src\Presentation\Leuze.Modules\net5.0'               #Upload all builds as artifact
+#Job for building on linux
+build_job_linux:
+  stage: build
+  tags:
+    - dotnet
+    - linux
+  only:
+    refs:
+      - branches
+    variables:
+      - $CI_COMMIT_MESSAGE =~ /@build/i                       #manual trigger for building
+      - $CI_COMMIT_MESSAGE =~ /@test/i                        #manual trigger for testing
+      - $CI_COMMIT_MESSAGE =~ /@deploy/i                      #manual trigger for deploy
+      - $CI_COMMIT_MESSAGE =~ /See merge request/             #auto trigger for merge requests from GitLab
+      - $CI_COMMIT_MESSAGE =~ /merge branch/i                 #auto trigger for merge requests from command
+      - $CI_COMMIT_MESSAGE =~ /Merge remote-tracking branch/i #auto trigger for remote merge requests from command
+  script:
+    - 'dotnet build'                               #Build project
+  artifacts:
+    expire_in: 2 days
+    paths:
+      - '.\src\Presentation\Leuze.App\bin\Debug\net5.0'            #Upload all builds as artifact
+      - '.\src\Presentation\Leuze.Modules\net5.0'               #Upload all builds as artifact
+#Job for testing windows
+test_job_windows:
   stage: test
   tags:
-    - csharp
-    - win10
+    - dotnet
+    - windows10
   only:
     refs:
       - branches
     variables:
-      - $CI_COMMIT_MESSAGE =~ /@testApp/i                       #manual trigger for testing
+      - $CI_COMMIT_MESSAGE =~ /@testWindows/i                       #manual trigger for testing
       - $CI_COMMIT_MESSAGE =~ /@deploy/i                        #manual trigger for deploy
       - $CI_COMMIT_MESSAGE =~ /@testFull/i                      #manual trigger for testing full
       - $CI_COMMIT_MESSAGE =~ /See merge request/               #auto trigger for merge requests from GitLab
       - $CI_COMMIT_MESSAGE =~ /merge branch/i                   #auto trigger for merge requests from command
       - $CI_COMMIT_MESSAGE =~ /Merge remote-tracking branch/i   #auto trigger for remote merge requests from command
   script:
-    - '& "$VSTEST_PATH" .\CalcTests\bin\x64\Release\CalcTests.dll'    #Run tests using console mode of MSTest (Unit)
+    - 'dotnet test'    #Run tests using console mode of MSTest (Unit)
   dependencies:
-    - build_job
-#Job for release public
-release_public_job:
-  stage: release
+    - build_job_windows
+#Job for testing linux
+test_job_linux:
+  stage: test
   tags:
-    - csharp
-    - win10
+    - dotnet
+    - linux
   only:
     refs:
-      - master
+      - branches
     variables:
-      - $CI_COMMIT_MESSAGE =~ /@deploy/i                        #manual trigger for testing
+      - $CI_COMMIT_MESSAGE =~ /@testLinux/i                       #manual trigger for testing
+      - $CI_COMMIT_MESSAGE =~ /@deploy/i                        #manual trigger for deploy
+      - $CI_COMMIT_MESSAGE =~ /@testFull/i                      #manual trigger for testing full
       - $CI_COMMIT_MESSAGE =~ /See merge request/               #auto trigger for merge requests from GitLab
       - $CI_COMMIT_MESSAGE =~ /merge branch/i                   #auto trigger for merge requests from command
       - $CI_COMMIT_MESSAGE =~ /Merge remote-tracking branch/i   #auto trigger for remote merge requests from command
   script:
-    - '$today = (Get-Date).ToString("yyyy_MM_dd-HH_mm_ss")'
-    - '& mkdir "$RELEASE_FOLDER\$today"'
-    - '& echo "Build branch: $CI_COMMIT_BRANCH`n" > $RELEASE_FOLDER\$today\buildLog.txt'
-    - '& echo "Pipeline: $CI_PIPELINE_URL`n" >> $RELEASE_FOLDER\$today\buildLog.txt'
-    - '& echo "Pipeline trigger source: $CI_PIPELINE_SOURCE`n" >> $RELEASE_FOLDER\$today\buildLog.txt'
-    - '& echo "Runner: $CI_RUNNER_DESCRIPTION`n" >> $RELEASE_FOLDER\$today\buildLog.txt'
-    - '& echo "Description: $CI_COMMIT_MESSAGE`n" >> $RELEASE_FOLDER\$today\buildLog.txt'
-    - '& xcopy /y /s ".\DummyProject\bin\*.*" "$RELEASE_FOLDER\$today"'
-  artifacts:
-    name: "Deploy artifact"
-    expire_in: 30 days
-    paths:
-      - '.\DummyProject\DummyProject\bin\'
+    - 'dotnet test'    #Run tests using console mode of MSTest (Unit)
   dependencies:
-    - build_job     #Build must be ok and using this, artifacts will be used
-    - test_job      #Only when tests are OK
\ No newline at end of file
+    - build_job_linux
+##Job for release public
+#release_public_job:
+#  stage: release
+#  tags:
+#    - csharp
+#    - win10
+#  only:
+#    refs:
+#      - master
+#    variables:
+#      - $CI_COMMIT_MESSAGE =~ /@deploy/i                        #manual trigger for testing
+#      - $CI_COMMIT_MESSAGE =~ /See merge request/               #auto trigger for merge requests from GitLab
+#      - $CI_COMMIT_MESSAGE =~ /merge branch/i                   #auto trigger for merge requests from command
+#      - $CI_COMMIT_MESSAGE =~ /Merge remote-tracking branch/i   #auto trigger for remote merge requests from command
+#  script:
+#    - '$today = (Get-Date).ToString("yyyy_MM_dd-HH_mm_ss")'
+#    - '& mkdir "$RELEASE_FOLDER\$today"'
+#    - '& echo "Build branch: $CI_COMMIT_BRANCH`n" > $RELEASE_FOLDER\$today\buildLog.txt'
+#    - '& echo "Pipeline: $CI_PIPELINE_URL`n" >> $RELEASE_FOLDER\$today\buildLog.txt'
+#    - '& echo "Pipeline trigger source: $CI_PIPELINE_SOURCE`n" >> $RELEASE_FOLDER\$today\buildLog.txt'
+#    - '& echo "Runner: $CI_RUNNER_DESCRIPTION`n" >> $RELEASE_FOLDER\$today\buildLog.txt'
+#    - '& echo "Description: $CI_COMMIT_MESSAGE`n" >> $RELEASE_FOLDER\$today\buildLog.txt'
+#    - '& xcopy /y /s ".\DummyProject\bin\*.*" "$RELEASE_FOLDER\$today"'
+#  artifacts:
+#    name: "Deploy artifact"
+#    expire_in: 30 days
+#    paths:
+#      - '.\DummyProject\DummyProject\bin\'
+#  dependencies:
+#    - build_job     #Build must be ok and using this, artifacts will be used
+#    - test_job      #Only when tests are OK
\ No newline at end of file
