代码拉取完成,页面将自动刷新
# 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
# Pipeline-level keywords belong here
trigger:
- master
pr:
- master
pool:
vmImage: 'ubuntu-18.04'
variables:
- group: credentials
- group: npm
- name: SOFTHSM2_CONF
value: $(Build.Repository.LocalPath)/test/ts-fixtures/hsm/softhsm2.conf
- name: FABRIC_VERSION
value: 2.2
# A Pipeline contains one or more stages
# A stage is a related collection of jobs. By default stages run sequentially
# A job is a collection of steps run by an agent or server
stages:
- stage: SetupRunTests
displayName: Setup and Run Tests
jobs:
- job: SetupRunTests
displayName: Install Node.js and run tests on
strategy:
matrix:
Node10:
versionSpec: '10.x'
Node12:
versionSpec: '12.x'
steps:
- task: NodeTool@0
inputs:
versionSpec: "$(versionSpec)"
displayName: Install Node.js
- script: |
sudo apt-get install softhsm2
softhsm2-util --init-token --slot 0 --label "ForFabric" --pin 98765432 --so-pin 1234
displayName: Install SoftHSM
- script: npm install
displayName: npm install
- script: npm run installAndGenerateCerts
displayName: Generate credentials
- script: npm run pullFabricImages
displayName: Pull Fabric Images
- script: npm test
displayName: Run tests
- stage: Publish
displayName: Publish Packages and Docs
jobs:
- job: PublishPackages
displayName: Publish npm packages
condition: and(succeeded(), eq(variables['Build.Reason'], 'IndividualCI'))
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: Install Node.js
- script: npm install
displayName: npm install
- script: npm run compile
displayName: Compile
- script: scripts/ci_scripts/azurePublishNpmPackages.sh
displayName: Publish packages
env:
NPM_TOKEN: "$(NPM)"
PROJECT_DIR: "$(Build.Repository.LocalPath)"
- job: PublishDocs
displayName: Publish API documentation
condition: and(succeeded(), eq(variables['Build.Reason'], 'IndividualCI'))
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: Install Node.js
- script: npm install
displayName: npm install
- script: npm run compile
displayName: Compile
- script: scripts/ci_scripts/azurePublishApiDocs.sh
displayName: Publish API docs
env:
GITHUB_USER: 'Hyperledger Bot'
GITHUB_EMAIL: 'hlfdev.azp@gmail.com'
PUBLISH_URL: "https://$(GITHUB-PAT)@github.com/hyperledger/fabric-sdk-node.git"
PROJECT_DIR: "$(Build.Repository.LocalPath)"
STAGING_DIR: "$(Build.StagingDirectory)/gh-pages"
SOURCE_BRANCH: "$(Build.SourceBranchName)"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。