-
Notifications
You must be signed in to change notification settings - Fork 12
/
wercker.yml
96 lines (92 loc) · 2.79 KB
/
wercker.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
93
94
95
96
box: microsoft/dotnet:1.1.1-sdk
services:
- id: postgres
env:
POSTGRES_PASSWORD: inteword
POSTGRES_USER: integrator
POSTGRES_DB: locationservice
no-response-timeout: 10
build:
steps:
# compile
- script:
name: restore
cwd: src/StatlerWaldorfCorp.LocationService
code: |
dotnet restore
- script:
name: build
cwd: src/StatlerWaldorfCorp.LocationService
code: |
dotnet build
# unit tests
- script:
name: test-restore
cwd: test/StatlerWaldorfCorp.LocationService.Tests
code: |
dotnet restore
- script:
name: test-build
cwd: test/StatlerWaldorfCorp.LocationService.Tests
code: |
dotnet build
- script:
name: test-run
cwd: test/StatlerWaldorfCorp.LocationService.Tests
code: |
dotnet test
# integration tests
- script:
name: integration-migrate
cwd: src/StatlerWaldorfCorp.LocationService
code: |
export TRANSIENT=false
export POSTGRES__CSTR="Host=$POSTGRES_PORT_5432_TCP_ADDR"
export POSTGRES__CSTR="$POSTGRES__CSTR;Username=integrator;Password=inteword;"
export POSTGRES__CSTR="$POSTGRES__CSTR;Port=$POSTGRES_PORT_5432_TCP_PORT;Database=locationservice"
dotnet ef database update
- script:
name: integration-restore
cwd: test/StatlerWaldorfCorp.LocationService.Integration
code: |
dotnet restore
- script:
name: integration-build
cwd: test/StatlerWaldorfCorp.LocationService.Integration
code: |
dotnet build
- script:
name: integration-test
cwd: test/StatlerWaldorfCorp.LocationService.Integration
code: |
dotnet test
# packaging
- script:
name: publish
cwd: src/StatlerWaldorfCorp.LocationService
code: |
dotnet publish -o publish
- script:
name: copy binary
cwd: src/StatlerWaldorfCorp.LocationService
code: |
cp -r . $WERCKER_OUTPUT_DIR/app
- script:
name: copy entrypoint
code: |
cp docker_entrypoint.sh $WERCKER_OUTPUT_DIR/app
- script:
name: copy config
cwd: src/StatlerWaldorfCorp.LocationService
code: |
cp appsettings*json $WERCKER_OUTPUT_DIR/app/publish
mkdir -p $WERCKER_OUTPUT_DIR/app/publish/app/tmp
deploy:
steps:
- internal/docker-push:
cwd: $WERCKER_OUTPUT_DIR/app
username: $USERNAME
password: $PASSWORD
repository: dotnetcoreservices/locationservice
registry: https://registry.hub.docker.com
entrypoint: "/pipeline/source/app/docker_entrypoint.sh"