-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
79 lines (75 loc) · 2.27 KB
/
Copy pathazure-pipelines.yml
File metadata and controls
79 lines (75 loc) · 2.27 KB
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
name: $(Rev:r)
# Summary:
# Linux: Tests using docker Kafka instance (note test suite does not run net framework as CK on mono is not supported)
# 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'
strategy:
matrix:
CK_1_9_2:
ConfluentKafkaVersion: '1.9.2'
LibrdkafkaRedistVersion: '1.9.2'
CK_2_14_0:
ConfluentKafkaVersion: '2.14.0'
LibrdkafkaRedistVersion: '2.14.0'
steps:
- task: UseDotNet@2
displayName: 'Install .NET SDK (global.json)'
inputs:
packageType: sdk
useGlobalJson: true
- task: UseDotNet@2
displayName: 'Install .NET SDK 10.x'
inputs:
packageType: sdk
version: 10.x
- 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 \
ches/kafka
sleep 15
displayName: Docker kafka for integration tests
- script: dotnet test build.proj -v d /p:ConfluentKafkaVersion=$(ConfluentKafkaVersion) /p:LibrdkafkaRedistVersion=$(LibrdkafkaRedistVersion)
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:
- task: UseDotNet@2
displayName: 'Install .NET SDK (global.json)'
inputs:
packageType: sdk
useGlobalJson: true
- task: UseDotNet@2
displayName: 'Install .NET SDK 10.x'
inputs:
packageType: sdk
version: 10.x
- script: dotnet pack build.proj
displayName: dotnet pack build.proj