From bc436e851261adfafc8b3ca7f334c0651e21c876 Mon Sep 17 00:00:00 2001 From: Nick Lincoln Date: Thu, 31 Dec 2020 09:38:55 +0000 Subject: [PATCH] Azure pipelines build (#1105) Signed-off-by: nkl199@yahoo.co.uk --- .../benchmark-integration-test-direct.sh | 0 {.travis => .build}/checks-and-unit-tests.sh | 0 {.travis => .build}/publish.sh | 0 .travis.yml | 14 +-- azure-pipelines.yml | 91 +++++++++++++++++++ 5 files changed, 98 insertions(+), 7 deletions(-) rename {.travis => .build}/benchmark-integration-test-direct.sh (100%) rename {.travis => .build}/checks-and-unit-tests.sh (100%) rename {.travis => .build}/publish.sh (100%) create mode 100644 azure-pipelines.yml diff --git a/.travis/benchmark-integration-test-direct.sh b/.build/benchmark-integration-test-direct.sh similarity index 100% rename from .travis/benchmark-integration-test-direct.sh rename to .build/benchmark-integration-test-direct.sh diff --git a/.travis/checks-and-unit-tests.sh b/.build/checks-and-unit-tests.sh similarity index 100% rename from .travis/checks-and-unit-tests.sh rename to .build/checks-and-unit-tests.sh diff --git a/.travis/publish.sh b/.build/publish.sh similarity index 100% rename from .travis/publish.sh rename to .build/publish.sh diff --git a/.travis.yml b/.travis.yml index 8979e2eaf..5361c56fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,31 +25,31 @@ jobs: - stage: checks and unit tests name: Package name check, license check, lint check, unit tests if: type = pull_request OR repo != hyperledger/caliper - script: ./.travis/checks-and-unit-tests.sh + script: ./.build/checks-and-unit-tests.sh # parallel integrations tests - stage: benchmark integration tests name: HL Fabric integration test if: type = pull_request OR repo != hyperledger/caliper - script: BENCHMARK=fabric ./.travis/benchmark-integration-test-direct.sh + script: BENCHMARK=fabric ./.build/benchmark-integration-test-direct.sh - name: Ethereum integration test if: type = pull_request OR repo != hyperledger/caliper - script: BENCHMARK=ethereum ./.travis/benchmark-integration-test-direct.sh + script: BENCHMARK=ethereum ./.build/benchmark-integration-test-direct.sh - name: HL Besu integration test if: type = pull_request OR repo != hyperledger/caliper - script: BENCHMARK=besu ./.travis/benchmark-integration-test-direct.sh + script: BENCHMARK=besu ./.build/benchmark-integration-test-direct.sh - name: FISCO-BCOS integration test if: type = pull_request OR repo != hyperledger/caliper - script: BENCHMARK=fisco-bcos ./.travis/benchmark-integration-test-direct.sh + script: BENCHMARK=fisco-bcos ./.build/benchmark-integration-test-direct.sh - name: Generator integration test if: type = pull_request OR repo != hyperledger/caliper - script: BENCHMARK=generator ./.travis/benchmark-integration-test-direct.sh + script: BENCHMARK=generator ./.build/benchmark-integration-test-direct.sh # publish packages - stage: publish name: Publishing to NPM and Docker Hub if: type = push AND repo = hyperledger/caliper - script: ./.travis/publish.sh + script: ./.build/publish.sh cache: directories: diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..f3a8abf7b --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,91 @@ +trigger: +- main + +pool: + vmImage: 'ubuntu-latest' + +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' + +- job: fabricIntegration + displayName: 'Fabric Integration Test' + dependsOn: unitTests + 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' + dependsOn: unitTests + 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' + dependsOn: unitTests + 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' + dependsOn: unitTests + 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' + dependsOn: unitTests + variables: { BENCHMARK: generator } + steps: + - task: NodeTool@0 + inputs: + versionSpec: '10.x' + displayName: 'Install Node.js' + - script: | + .build/benchmark-integration-test-direct.sh