-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
88 lines (77 loc) · 2.47 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
# 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:
- master
pool:
vmImage: 'ubuntu-latest'
stages:
- stage: Stage1_Install_Dependencies
jobs:
- job: Job1_Install_NodeJS
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- deployment: Deployment_Test
displayName: 'Deployment Test'
environment: 'dev'
- stage: Stage2_Build_Apps
jobs:
- job: Job_Build_Apps
steps:
- script: |
cd ./quorum
npm install
npx truffle migrate --reset --network bankBuyerSeller
cp -r ../quorum ../webapp/bank
cp -r ../quorum ../webapp/buyer
cp -r ../quorum ../webapp/seller
cd ../webapp/bank/quorum/contractAddresses
displayName: "Deploy Smart Contracts"
- script: |
cp ./web3Setup.js ./webapp/lib/web3
cp -r ./webapp/lib/config ./webapp/bank
cp -r ./webapp/lib/web3 ./webapp/bank
cp ./webapp/package.json ./webapp/bank
cd ./webapp/bank
cat ./web3/web3Setup.js
npm install
displayName: 'NPM install for bank'
# - task: PublishTestResults@2
# condition: succeededOrFailed()
# inputs:
# testRunner: JUnit
# testResultsFiles: '**/TEST-RESULTS.xml'
- script: |
cp ./web3Setup.js ./webapp/lib/web3
cp -r ./webapp/lib/config ./webapp/buyer
cp -r ./webapp/lib/web3 ./webapp/buyer
cd ./webapp/buyer
cat ./web3/web3Setup.js
npm install
displayName: 'NPM install for buyer'
- script: |
cp ./web3Setup.js ./webapp/lib/web3
cp -r ./webapp/lib/config ./webapp/seller
cp -r ./webapp/lib/web3 ./webapp/seller
cd ./webapp/seller
cat ./web3/web3Setup.js
npm install
displayName: 'NPM install for seller'
- script: |
rm -rf *.yml
rm -rf *.md
rm .gitignore
rm -rf *.sh
rm .gitignore
rm -rf ./quorum
rm ./web3Setup.js
rm -rf ./webapp/lib
rm ./webapp/package.json
displayName: "Remove unnecessary files"
- publish: $(System.DefaultWorkingDirectory)/
artifact: WebApp
displayName: 'Publish artifact'