-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines-CI.yml
64 lines (52 loc) · 1.78 KB
/
azure-pipelines-CI.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
pr:
- main
pool:
vmImage: ubuntu-latest
variables:
srcName: 'CodeReview.Orchestrator'
wiremockPort: '19257:8080'
subsysTestsName: 'CodeReview.Orchestrator.SubsystemTests'
buildConfiguration: 'Release'
stages:
- stage: Build
displayName: Build and run tests
jobs:
- job: Build
displayName: Build
steps:
- task: gitversion/setup@0
displayName: Setup GitVersion
inputs:
versionSpec: '5.x'
- script: pwd && ls
- task: gitversion/execute@0
displayName: Execute GitVersion
- task: UseDotNet@2
displayName: 'Install .NET Core SDK'
inputs:
version: 5.x
- task: DotNetCoreCLI@2
displayName: Build project
inputs:
command: 'build'
projects: './src/$(srcName)/$(srcName).csproj'
arguments: '-c $(buildConfiguration)'
- task: DockerInstaller@0
displayName: Install docker CLI
inputs:
dockerVersion: '17.09.0-ce'
- script: docker pull rodolpheche/wiremock
displayName: Pull rodolpheche/wiremock image
- script: docker run -d -it --name rodolpheche-wiremock-container --rm -p $(wiremockPort) rodolpheche/wiremock
displayName: Run rodolpheche-wiremock-container container
- task: DotNetCoreCLI@2
displayName: Run subsystem tests
inputs:
command: 'test'
projects: './test/$(subsysTestsName)/$(subsysTestsName).csproj'
arguments: '-c $(buildConfiguration)'
testRunTitle: 'Subsystem tests'
env:
DOTNET_ENVIRONMENT: 'Azure'
- script: docker rm -f rodolpheche-wiremock-container
displayName: Remove rodolpheche-wiremock-container container