forked from hyperledger/fabric-sdk-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
57 lines (46 loc) · 1.61 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
# 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-18.04'
variables:
- group: credentials
- group: npm
- name: SOFTHSM2_CONF
value: "$(Build.Repository.LocalPath)/test/fixtures/hsm/softhsm2.conf"
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: 'Install Node.js'
- script: |
sudo apt-get install softhsm2
softhsm2-util --init-token --slot 0 --label "My token 1" --pin 98765432 --so-pin 98765432
displayName: 'Install SoftHSM'
- script: npm install
displayName: 'npm install'
- script: npm run retrieveImages
displayName: 'Pull Docker images'
- script: npm run installAndGenerateCerts
displayName: 'Generate credentials'
- script: npm test
displayName: 'Run tests'
- script: scripts/ci_scripts/azurePublishNpmPackages.sh
condition: and(succeeded(), eq(variables['Build.Reason'], 'IndividualCI'))
displayName: 'Publish npm packages'
env:
NPM_TOKEN: $(NPM)
PROJECT_DIR: "$(Build.Repository.LocalPath)"
- script: scripts/ci_scripts/azurePublishApiDocs.sh
condition: and(succeeded(), eq(variables['Build.Reason'], 'IndividualCI'))
displayName: 'Publish API documentation'
env:
GITHUB_USER: 'Hyperledger Bot'
GITHUB_EMAIL: '[email protected]'
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)"