forked from hyperledger-caliper/caliper
-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
119 lines (109 loc) · 3.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
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
trigger:
branches:
include:
- master
pr:
branches:
include:
- master
pool:
vmImage: "ubuntu-latest"
variables:
- group: credentials
stages:
- stage: UnitTests
displayName: Run unit tests
jobs:
- job: unitTests
displayName: "Base build and unit tests"
steps:
- task: NodeTool@0
inputs:
versionSpec: "10.x"
displayName: "Install Node.js"
- script: |
./scripts/check-package-names.sh
displayName: "check package names"
- script: |
npm install
npm run bootstrap
displayName: "npm install, bootstrap"
- script: |
./packages/caliper-publish/publish.js version check
displayName: "version check"
- script: |
npm test
displayName: "unit test"
- stage: IntegrationTests
displayName: Run integration tests
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
dependsOn: UnitTests
jobs:
- job: fabricIntegration
displayName: "Fabric Integration Test"
variables: { BENCHMARK: fabric }
steps:
- task: NodeTool@0
inputs:
versionSpec: "10.x"
displayName: "Install Node.js"
- script: |
.build/benchmark-integration-test-direct.sh
- job: ethereumIntegration
displayName: "Ethereum Integration Test"
variables: { BENCHMARK: ethereum }
steps:
- task: NodeTool@0
inputs:
versionSpec: "10.x"
displayName: "Install Node.js"
- script: |
.build/benchmark-integration-test-direct.sh
- job: besuIntegration
displayName: "Besu Integration Test"
variables: { BENCHMARK: besu }
steps:
- task: NodeTool@0
inputs:
versionSpec: "10.x"
displayName: "Install Node.js"
- script: |
.build/benchmark-integration-test-direct.sh
- job: fiscoIntegration
displayName: "FISCO BCOS Integration Test"
variables: { BENCHMARK: fisco-bcos }
steps:
- task: NodeTool@0
inputs:
versionSpec: "10.x"
displayName: "Install Node.js"
- script: |
.build/benchmark-integration-test-direct.sh
- job: generatorIntegration
displayName: "Generator Integration Test"
variables: { BENCHMARK: generator }
steps:
- task: NodeTool@0
inputs:
versionSpec: "10.x"
displayName: "Install Node.js"
- script: |
.build/benchmark-integration-test-direct.sh
- stage: Publish
displayName: Publish Caliper
# having a blind succeeded here will not work if a preceding stage was skipped
condition: and(not(failed('UnitTests')), eq(variables['Build.Reason'], 'IndividualCI'))
jobs:
- job: PublishCaliper
displayName: "Publish Caliper to NPM and DockerHub"
steps:
- task: NodeTool@0
inputs:
versionSpec: "10.x"
displayName: "Install Node.js"
- script: .build/publish-caliper.sh
displayName: Publish Caliper
env:
NPM_TOKEN: "$(npm)"
DOCKER_USER: "$(DockerHub-Username)"
DOCKER_TOKEN: "$(DockerHub-Password)"