-
Notifications
You must be signed in to change notification settings - Fork 515
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FABN-1481] Remove node 8 support and add node 12 (#123)
- Run node 10 and 12 sequentially - Fix some strings in the tests - Update package package.jsons - Fixed typos Signed-off-by: heatherlp <[email protected]>
- Loading branch information
Showing
7 changed files
with
82 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
# 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 | ||
|
||
|
@@ -15,43 +16,75 @@ variables: | |
- name: SOFTHSM2_CONF | ||
value: "$(Build.Repository.LocalPath)/test/fixtures/hsm/softhsm2.conf" | ||
|
||
steps: | ||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: '12.x' | ||
displayName: 'Install Node.js' | ||
# 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 | ||
|
||
- script: | | ||
sudo apt-get install softhsm2 | ||
softhsm2-util --init-token --slot 0 --label "My token 1" --pin 98765432 --so-pin 98765432 | ||
displayName: 'Install SoftHSM' | ||
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 "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: npm install | ||
displayName: 'npm install' | ||
- 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: scripts/ci_scripts/azurePublishNpmPackages.sh | ||
displayName: Publish packages | ||
env: | ||
NPM_TOKEN: "$(NPM)" | ||
PROJECT_DIR: "$(Build.Repository.LocalPath)" | ||
|
||
- 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)" | ||
- 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: scripts/ci_scripts/azurePublishApiDocs.sh | ||
displayName: Publish API docs | ||
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)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters