-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec.yml
63 lines (62 loc) · 2.51 KB
/
buildspec.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
version: 0.2
phases:
pre_build:
commands:
- echo ASPNETCORE_ENVIRONMENT is $ASPNETCORE_ENVIRONMENT
- echo Restore started on `date`
- dotnet restore src/Blab.Api/src/Blab.Api/Blab.Api.csproj --source "https://api.nuget.org/v3/index.json;https://pkgs.dev.azure.com/audacia/Audacia.Public/_packaging/AudaciaPublic/nuget/v3/index.json"
- dotnet restore src/Blab.Api/src/Blab.Identity/Blab.Identity.csproj --source "https://api.nuget.org/v3/index.json;https://pkgs.dev.azure.com/audacia/Audacia.Public/_packaging/AudaciaPublic/nuget/v3/index.json"
- cd ./src/Blab.Ui/
- npm install --include=dev
- cd ../..
build:
commands:
- echo Build started on `date`
# api build
- dotnet publish -c release -o ./build_output/api src/Blab.Api/src/Blab.Api/Blab.Api.csproj
# identity build
- dotnet publish -c release -o ./build_output/id src/Blab.Api/src/Blab.Identity/Blab.Identity.csproj
# ui build
- cd ./src/Blab.Ui/
- npm run build-only
- cd ../..
- mv ./src/Blab.Ui/dist/blab-ui ./build_output/ui
# moving configs
- mv ./build_config/id/.platform -t ./build_output/id/
# # for debugging
# - ls ./build_output/api
# - ls ./build_output/ui
- ls ./build_output/id -a
# post_build:
# commands:
# # update db context
# - echo Update database on `date`
# - dotnet ef database update --startup-project Blab.Api --project Blab.DataAccess --context BlabDbContext
# # update db context - openiddict
# - echo Update database on `date`
# - dotnet ef database update --startup-project Blab.Identity --project Blab.DataAccess --context OpenIddictDbContext
# # install openiddict seeding tool
# - dotnet new tool-manifest --force
# - dotnet tool install Audacia.Auth.OpenIddict.Seeding.EntityFrameworkCore --version 1.4.9 --add-source https://pkgs.dev.azure.com/audacia/Audacia.Public/_packaging/AudaciaPublic/nuget/v3/index.json
# # run openiddict seeding
# - echo Run OpenIddict Seeding
# - dotnet tool run openiddict-efcore-seeding "./build_output/id" "Blab.Identity" "int" "OpenIddictDbContext"
artifacts:
files:
- './build_output/*'
secondary-artifacts:
api:
base-directory: './build_output/api'
files:
- '**/*'
name: api
identity:
base-directory: './build_output/id'
files:
- '**/*'
name: identity
ui:
base-directory: './build_output/ui'
files:
- '**/*'
name: ui