-
Notifications
You must be signed in to change notification settings - Fork 24
/
azure-pipelines.yml
51 lines (47 loc) · 1.43 KB
/
azure-pipelines.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
name: $(Rev:r)
# Summary:
# Linux: Tests using docker Kafka instance
# Windows: Builds and emits nupkg as artifacts
# MacOS: Builds only
jobs:
- job: Windows
pool:
vmImage: 'windows-latest'
steps:
- script: dotnet pack build.proj
displayName: dotnet pack build.proj
env:
BUILD_PR: $(SYSTEM.PULLREQUEST.PULLREQUESTNUMBER)
BUILD_ID: $(BUILD.BUILDNUMBER)
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: 'bin'
artifactName: 'nupkgs'
- job: Linux
pool:
vmImage: 'ubuntu-latest'
steps:
- script: |
docker network create kafka-net
docker run -d --name zookeeper --network kafka-net --publish 2181:2181 zookeeper:3.4
docker run -d --name kafka --network kafka-net --hostname localhost --publish 9092:9092 \
--env KAFKA_ADVERTISED_HOST_NAME=127.0.0.1 --env ZOOKEEPER_IP=zookeeper \
--env KAFKA_AUTO_CREATE_TOPICS_ENABLE=true --env KAFKA_NUM_PARTITIONS=4 \
ches/kafka
sleep 15
displayName: Docker kafka for integration tests
- script: dotnet build build.proj -v d
displayName: Run Integration tests
env:
TEST_KAFKA_BROKER: localhost:9092
- task: PublishTestResults@2
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: 'tests/**/*.trx'
condition: succeededOrFailed()
- job: MacOS
pool:
vmImage: 'macOS-latest'
steps:
- script: dotnet pack build.proj
displayName: dotnet pack build.proj