-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathappveyor.yml
92 lines (76 loc) · 3.79 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
version: 1.0.0.{build}
branches:
only:
- master
skip_tags: true
skip_commits:
message: /\[ci skip\]|\[skip ci\]/
max_jobs: 1
image: Visual Studio 2022
clone_folder: c:\projects\accounting
shallow_clone: true
clone_depth: 1
environment:
BUILD_DIR: /data/accounting-build
PRIVATE_KEY_PASSWORD:
secure: nbaZlhNJOSaf9Yv6Vn/2NRTMYLLrrerd48SX58e+GLk=
DOCKER_HOST:
secure: VkkxNLf0DKs10u8LpvNl5Tg8gmlq17OIwBGN5scO0YI=
DOCKER_CERT_PATH: c:\projects\accounting\certs
DOCKER_TLS_VERIFY: YES
DOCKER_MACHINE_NAME: accounting
DOCKER_USER: b1f6c1c4
DOCKER_PASS:
secure: xh4rPu+6sbJUK4FlcoIUcrvOxrDhIhs2iLOtimcKtdd5aHi1M7hYXQtMg0JkluLe
COVERALLS_REPO_TOKEN:
secure: lV5WGMiwfTLSBoDzNNzc3XpvvfjNO6oqjNDk6ccQugihg425h/NAvh6NVGHJgHjm
services:
- mongodb
install:
- dotnet tool install coveralls.net --tool-path tools
- choco install --no-progress sed archiver nodejs
- arc archive nginx/archive.tar.xz .
- cd nginx && npm ci
- nuget restore AccountingServer.sln
- openssl rsa -in ./certs/key.pem -out ./certs/key.pem -passin env:PRIVATE_KEY_PASSWORD
dotnet_csproj:
patch: true
file: '**\*.csproj'
version_prefix: 1.0.0.$(APPVEYOR_BUILD_NUMBER)
package_version: 1.0.0
assembly_version: 1.0.0.$(APPVEYOR_BUILD_NUMBER)
file_version: $(APPVEYOR_BUILD_VERSION).$(APPVEYOR_BUILD_NUMBER)
informational_version: $(APPVEYOR_REPO_COMMIT)
build_script:
- cd nginx && npm run build
- msbuild /p:Configuration=Gen /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" AccountingServer.QueryGeneration/AccountingServer.QueryGeneration.csproj
- ps: ./DeployParser.ps1
- msbuild /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:VersionSuffix=$(APPVEYOR_BUILD_ID) AccountingServer.Entities\AccountingServer.Entities.csproj
- msbuild /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:VersionSuffix=$(APPVEYOR_BUILD_ID) AccountingServer.DAL\AccountingServer.DAL.csproj
- msbuild /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:VersionSuffix=$(APPVEYOR_BUILD_ID) AccountingServer.BLL\AccountingServer.BLL.csproj
- msbuild /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:VersionSuffix=$(APPVEYOR_BUILD_ID) AccountingServer.Shell\AccountingServer.Shell.csproj
- msbuild /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:VersionSuffix=$(APPVEYOR_BUILD_ID) AccountingServer\AccountingServer.csproj
- msbuild /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" AccountingServer.Test\AccountingServer.Test.csproj
test_script:
- dotnet test /p:AltCover=true /p:AltCoverAssemblyExcludeFilter="xunit|System.Linq.Async|AltCover.Monitor|TestPlatform|testhost" /p:AltCoverFileFilter="Microsoft\.NET\.Test\.Sdk\.Program\.cs" & exit 0
- .\tools\csmacnz.Coveralls --opencover -i AccountingServer.Test/coverage.xml --useRelativePaths & exit 0
artifacts:
- path: 'nginx\dist'
name: webpack
type: Zip
- path: 'AccountingServer.BLL\Parsing'
name: Parsing
type: Zip
- path: 'AccountingServer\bin\Release\net8.0'
name: AccountingServer
type: Zip
before_deploy:
- docker version
deploy_script:
- docker build --pull -t b1f6c1c4/accounting-frontend:latest ./nginx
- docker build -f nginx/Dockerfile.local -t b1f6c1c4/accounting-frontend:local ./nginx
- cp -r example/config.d ./AccountingServer/bin/Release/net8.0/
- docker build --pull -t b1f6c1c4/accounting-backend:latest ./AccountingServer/bin/Release/net8.0
- docker login -u %DOCKER_USER% -p %DOCKER_PASS%
- docker push b1f6c1c4/accounting-frontend
- docker push b1f6c1c4/accounting-backend