.gitlab-ci.yml 1.41 KB
Newer Older
Kim Meiser's avatar
Kim Meiser committed
1
2
3
variables:
  NUGET_PATH: 'C:\dev\tools\NuGet\nuget.exe'
  MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe'
4
  XUNIT_PATH: packages\xunit.runner.console\2.4.1\tools\net472
5
  UNITTEST_FOLDER: '.\tests\JeoParody.Test\bin\Release\net48'
6
  
Kim Meiser's avatar
Kim Meiser committed
7
8
9
stages:
  - build
  - test
10
  - deploy
Kim Meiser's avatar
Kim Meiser committed
11
12

build_job:
Kim Meiser's avatar
Kim Meiser committed
13
  stage: build
14
15
  tags:
    - dotnetframework
Kim Meiser's avatar
Kim Meiser committed
16
17
18
  only:
    - branches
  script:
19
    - '& "$env:NUGET_PATH" restore -PackagesDirectory packages'
Kim Meiser's avatar
Kim Meiser committed
20
    - '& "$env:MSBUILD_PATH" /p:Configuration=Release /clp:ErrorsOnly'
21
    - '& if (Test-Path JeoParody) { Remove-Item JeoParody -Recurse -Confirm:$false }'
22
23
24
    - '& robocopy .\Categories\fertig JeoParody *.* /S /W:1'
    - '& robocopy .\src\Jeoparody\bin\Release\ JeoParody Jeoparody.* /W:1'
    - '& robocopy .\src\Jeoparody\bin\Release\Media JeoParody\Media *.* /S /W:1'
Kim Meiser's avatar
Kim Meiser committed
25
26
27
  artifacts:
    expire_in: 2 days
    paths:
28
      - '$env:UNITTEST_FOLDER\*.*'
Kim Meiser's avatar
Kim Meiser committed
29
      - '.\$env:XUNIT_PATH\*.*'
30
      - 'JeoParody\*.*'
Kim Meiser's avatar
Kim Meiser committed
31
32

test_job:
Kim Meiser's avatar
Kim Meiser committed
33
  stage: test
34
35
  tags:
    - dotnetframework
Kim Meiser's avatar
Kim Meiser committed
36
37
38
  only:
    - branches
  script:
Kim Meiser's avatar
Kim Meiser committed
39
    - '& "$env:XUNIT_PATH\xunit.console.exe" "$env:UNITTEST_FOLDER\Jeoparody.Test.dll"'
Kim Meiser's avatar
Kim Meiser committed
40
  dependencies:
41
42
43
44
45
46
47
48
49
50
51
    - build_job

deploy_job:
  stage: deploy
  tags:
    - dotnetframework
  only:
    - branches
  script:
    - 'echo "deploying..."'
  artifacts:
52
    name: 'JeoParody-$CI_COMMIT_SHORT_SHA'
53
54
    expire_in: 2 days
    paths:
55
      - 'JeoParody\*.*'