-
Notifications
You must be signed in to change notification settings - Fork 12
/
azure-pipelines.yml
139 lines (129 loc) · 3.67 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- main
schedules:
- cron: "0 0 * * 1" # https://crontab.guru/#0_0_*_*_1
displayName: "Weekly Monday build"
branches:
include:
- master
jobs:
- job: lint
displayName: lint
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: |
npm install
npm run lint
displayName: 'npm install and lint'
- job: ut
strategy:
matrix:
linux:
imageName: 'ubuntu-latest'
#mac:
# imageName: 'macOS-latest'
windows:
imageName: 'windows-latest'
displayName: ut
pool:
vmImage: $(imageName)
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: |
npm ci
npm test
displayName: 'npm ci'
- job: audit
displayName: audit
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: |
npm audit || true
displayName: 'npm install and lint'
- job: e2eTestNetwork
displayName: e2eTestNetworkSample
dependsOn:
- ut
pool:
vmImage: 'ubuntu-latest'
steps:
- script: npm install
displayName: npmInstall
- script: curl -vsS https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash
displayName: downloadFabricSample
- script: docker pull ghcr.io/hyperledger-twgc/tape
displayName: downloadTape
- script: cp sample/test-network/prepareConfig.sh fabric-samples/test-network
displayName: cpPrepareConfig
- script: cp sample/test-network/config.yaml .
displayName: cpconfig.yaml
- script: npm run e2eTestNetwork
displayName: startEnd2EndTest
- script: cat ./data/rs.csv
displayName: checkResult
- script: cat logger.log
displayName: checkLog
- job: docker
displayName: dockerBuild
dependsOn:
- ut
pool:
vmImage: 'ubuntu-latest'
steps:
- script: docker build -t 19902439/probe:latest .
displayName: docker build
# - job: e2eMiniFab
# displayName: e2eMiniFabSample
# dependsOn:
# - ut
# pool:
# vmImage: 'ubuntu-latest'
# steps:
# - script: npm install
# displayName: npmInstall
# - script: docker pull ghcr.io/hyperledger-twgc/tape
# displayName: downloadTape
# - script: mkdir -p minifabric && cd minifabric && curl -o minifab -sL https://tinyurl.com/yxa2q6yr && chmod +x minifab && cd ..
# displayName: download downloadMiniFab
# - script: cp sample/minifab/* minifabric
# displayName: cpPrepareConfig
# - script: npm run e2eMiniFab
# displayName: startEnd2EndTest
# - script: cat ./data/rs.csv
# displayName: checkResult
# - script: cat logger.log
# displayName: checkLog
- job: releasePage
pool:
vmImage: "ubuntu-latest"
dependsOn:
- e2eTestNetwork
# - e2eMiniFab
steps:
- task: GitHubRelease@1
inputs:
gitHubConnection: 'SamYuan1990 (5)'
repositoryName: '$(Build.Repository.Name)'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'gitTag'
tagPattern: 'v.*'
changeLogCompareToRelease: 'lastFullRelease'
changeLogType: 'commitBased'