mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
Move the remaining sample tests from Azure to GHA
Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
This commit is contained in:
parent
b7b06b9de3
commit
38a36c65d3
16 changed files with 403 additions and 170 deletions
6
.github/workflows/lint.yaml
vendored
6
.github/workflows/lint.yaml
vendored
|
|
@ -7,11 +7,9 @@ run-name: ${{ github.actor }} is linting fabric-samples
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches: [ "main" ]
|
||||||
- main
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches: [ "main" ]
|
||||||
- main
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GO_VER: 1.18.3
|
GO_VER: 1.18.3
|
||||||
|
|
|
||||||
43
.github/workflows/rest-sample.yaml
vendored
Normal file
43
.github/workflows/rest-sample.yaml
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
name: REST Sample
|
||||||
|
run-name: ${{ github.actor }} is testing the REST Sample
|
||||||
|
|
||||||
|
env:
|
||||||
|
NODE_VER: 16.x
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
paths: [ "asset-transfer-basic/rest-api-typescript/**" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
paths: [ "asset-transfer-basic/rest-api-typescript/**" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-sample:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: ${{ env.NODE_VER }}
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: '**/package-lock.json'
|
||||||
|
|
||||||
|
- name: Install REST Sample Dependencies
|
||||||
|
working-directory: asset-transfer-basic/rest-api-typescript
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Build REST Sample Application
|
||||||
|
run: npm run build
|
||||||
|
working-directory: asset-transfer-basic/rest-api-typescript
|
||||||
|
|
||||||
|
- name: Test REST Sample Application
|
||||||
|
run: npm test
|
||||||
|
working-directory: asset-transfer-basic/rest-api-typescript
|
||||||
35
.github/workflows/test-network-basic.yaml
vendored
Normal file
35
.github/workflows/test-network-basic.yaml
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
name: Test Network Basic
|
||||||
|
run-name: ${{ github.actor }} is running the Test Network Basic tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
basic:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
chaincode-language:
|
||||||
|
- go
|
||||||
|
- javascript
|
||||||
|
- typescript
|
||||||
|
- java
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up the test network runtime
|
||||||
|
uses: ./.github/actions/test-network-setup
|
||||||
|
|
||||||
|
- name: Run Test Network Basic
|
||||||
|
working-directory: test-network
|
||||||
|
run: ../ci/scripts/run-test-network-basic.sh
|
||||||
|
env:
|
||||||
|
CHAINCODE_LANGUAGE: ${{ matrix.chaincode-language }}
|
||||||
37
.github/workflows/test-network-events.yaml
vendored
Normal file
37
.github/workflows/test-network-events.yaml
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
name: Test Network Events
|
||||||
|
run-name: ${{ github.actor }} is running the Test Network Events tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
events:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
chaincode-language:
|
||||||
|
- javascript
|
||||||
|
- java
|
||||||
|
chaincode-name:
|
||||||
|
- events
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up the test network runtime
|
||||||
|
uses: ./.github/actions/test-network-setup
|
||||||
|
|
||||||
|
- name: Run Test
|
||||||
|
working-directory: test-network
|
||||||
|
run: ../ci/scripts/run-test-network-events.sh
|
||||||
|
env:
|
||||||
|
CHAINCODE_NAME: ${{ matrix.chaincode-name }}
|
||||||
|
CHAINCODE_LANGUAGE: ${{ matrix.chaincode-language }}
|
||||||
|
|
||||||
35
.github/workflows/test-network-gateway.yaml
vendored
Normal file
35
.github/workflows/test-network-gateway.yaml
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
name: Test Network Gateway
|
||||||
|
run-name: ${{ github.actor }} is running the Test Network Gateway tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
gateway:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
chaincode-language:
|
||||||
|
- go
|
||||||
|
- javascript
|
||||||
|
- typescript
|
||||||
|
- java
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up the test network runtime
|
||||||
|
uses: ./.github/actions/test-network-setup
|
||||||
|
|
||||||
|
- name: Run Test Network Off Chain
|
||||||
|
working-directory: test-network
|
||||||
|
env:
|
||||||
|
CHAINCODE_LANGUAGE: ${{ matrix.chaincode-language }}
|
||||||
|
run: ../ci/scripts/run-test-network-gateway.sh
|
||||||
44
.github/workflows/test-network-hsm.yaml
vendored
Normal file
44
.github/workflows/test-network-hsm.yaml
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
name: Test Network HSM
|
||||||
|
run-name: ${{ github.actor }} is running the Test Network HSM tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
hsm:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
chaincode-language:
|
||||||
|
- go
|
||||||
|
- javascript
|
||||||
|
- typescript
|
||||||
|
- java
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up the test network runtime
|
||||||
|
uses: ./.github/actions/test-network-setup
|
||||||
|
|
||||||
|
- name: Install SoftHSM
|
||||||
|
run: sudo apt install -y softhsm2
|
||||||
|
|
||||||
|
- name: Set up SoftHSM
|
||||||
|
run: |
|
||||||
|
echo directories.tokendir = /tmp > $HOME/softhsm2.conf
|
||||||
|
export SOFTHSM2_CONF=$HOME/softhsm2.conf
|
||||||
|
softhsm2-util --init-token --slot 0 --label "ForFabric" --pin 98765432 --so-pin 1234
|
||||||
|
|
||||||
|
- name: Run Test Network HSM
|
||||||
|
working-directory: test-network
|
||||||
|
env:
|
||||||
|
CHAINCODE_LANGUAGE: ${{ matrix.chaincode-language }}
|
||||||
|
run: ../ci/scripts/run-test-network-hsm.sh
|
||||||
37
.github/workflows/test-network-ledger.yaml
vendored
Normal file
37
.github/workflows/test-network-ledger.yaml
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
name: Test Network Ledger
|
||||||
|
run-name: ${{ github.actor }} is running the Test Network Ledger tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
basic:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
chaincode-language:
|
||||||
|
- go
|
||||||
|
- javascript
|
||||||
|
chaincode-name:
|
||||||
|
- ledger
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up the test network runtime
|
||||||
|
uses: ./.github/actions/test-network-setup
|
||||||
|
|
||||||
|
- name: Run Test
|
||||||
|
working-directory: test-network
|
||||||
|
run: ../ci/scripts/run-test-network-ledger.sh
|
||||||
|
env:
|
||||||
|
CHAINCODE_NAME: ${{ matrix.chaincode-name }}
|
||||||
|
CHAINCODE_LANGUAGE: ${{ matrix.chaincode-language }}
|
||||||
|
|
||||||
35
.github/workflows/test-network-off-chain.yaml
vendored
Normal file
35
.github/workflows/test-network-off-chain.yaml
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
name: Test Network Off Chain
|
||||||
|
run-name: ${{ github.actor }} is running the Test Network Off Chain tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
off-chain:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
chaincode-language:
|
||||||
|
- go
|
||||||
|
- javascript
|
||||||
|
- typescript
|
||||||
|
- java
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up the test network runtime
|
||||||
|
uses: ./.github/actions/test-network-setup
|
||||||
|
|
||||||
|
- name: Run Test Network Off Chain
|
||||||
|
working-directory: test-network
|
||||||
|
env:
|
||||||
|
CHAINCODE_LANGUAGE: ${{ matrix.chaincode-language }}
|
||||||
|
run: ../ci/scripts/run-test-network-off-chain.sh
|
||||||
36
.github/workflows/test-network-private.yaml
vendored
Normal file
36
.github/workflows/test-network-private.yaml
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
name: Test Network Private
|
||||||
|
run-name: ${{ github.actor }} is running the Test Network Private tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
private:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
chaincode-language:
|
||||||
|
- go
|
||||||
|
chaincode-name:
|
||||||
|
- private
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up the test network runtime
|
||||||
|
uses: ./.github/actions/test-network-setup
|
||||||
|
|
||||||
|
- name: Run Test
|
||||||
|
working-directory: test-network
|
||||||
|
run: ../ci/scripts/run-test-network-private.sh
|
||||||
|
env:
|
||||||
|
CHAINCODE_NAME: ${{ matrix.chaincode-name }}
|
||||||
|
CHAINCODE_LANGUAGE: ${{ matrix.chaincode-language }}
|
||||||
|
|
||||||
37
.github/workflows/test-network-sbe.yaml
vendored
Normal file
37
.github/workflows/test-network-sbe.yaml
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
name: Test Network SBE
|
||||||
|
run-name: ${{ github.actor }} is running the Test Network SBE tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
SBE:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
chaincode-language:
|
||||||
|
- typescript
|
||||||
|
- java
|
||||||
|
chaincode-name:
|
||||||
|
- sbe
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up the test network runtime
|
||||||
|
uses: ./.github/actions/test-network-setup
|
||||||
|
|
||||||
|
- name: Run Test
|
||||||
|
working-directory: test-network
|
||||||
|
run: ../ci/scripts/run-test-network-sbe.sh
|
||||||
|
env:
|
||||||
|
CHAINCODE_NAME: ${{ matrix.chaincode-name }}
|
||||||
|
CHAINCODE_LANGUAGE: ${{ matrix.chaincode-language }}
|
||||||
|
|
||||||
36
.github/workflows/test-network-secured.yaml
vendored
Normal file
36
.github/workflows/test-network-secured.yaml
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
name: Test Network Secured
|
||||||
|
run-name: ${{ github.actor }} is running the Test Network Secured tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
secured:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
chaincode-language:
|
||||||
|
- go
|
||||||
|
chaincode-name:
|
||||||
|
- secured
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up the test network runtime
|
||||||
|
uses: ./.github/actions/test-network-setup
|
||||||
|
|
||||||
|
- name: Run Test
|
||||||
|
working-directory: test-network
|
||||||
|
run: ../ci/scripts/run-test-network-secured.sh
|
||||||
|
env:
|
||||||
|
CHAINCODE_NAME: ${{ matrix.chaincode-name }}
|
||||||
|
CHAINCODE_LANGUAGE: ${{ matrix.chaincode-language }}
|
||||||
|
|
||||||
|
|
@ -8,109 +8,39 @@ trigger:
|
||||||
- release-2.2
|
- release-2.2
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
- name: FABRIC_VERSION
|
|
||||||
value: 2.4
|
|
||||||
- name: GOPATH
|
|
||||||
value: $(Build.Repository.LocalPath)
|
|
||||||
- name: GO_BIN
|
|
||||||
value: $(GOPATH)/bin
|
|
||||||
- name: GO_VER
|
|
||||||
value: 1.18.3
|
|
||||||
- name: NODE_VER
|
- name: NODE_VER
|
||||||
value: 16.x
|
value: 16.x
|
||||||
- name: PATH
|
|
||||||
value: $(GOPATH)/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
|
|
||||||
- group: credentials
|
- group: credentials
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
- job: REST_Sample
|
- job: REST_Sample
|
||||||
displayName: REST Server Sample
|
displayName: REST Server Sample
|
||||||
pool:
|
pool:
|
||||||
vmImage: ubuntu-20.04
|
vmImage: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- template: templates/asset-transfer-basic/azure-pipelines-rest.yml
|
- task: NodeTool@0
|
||||||
|
inputs:
|
||||||
- job: TestNetworkLedger
|
versionSpec: $(NODE_VER)
|
||||||
displayName: Test Network
|
displayName: Install Node.js
|
||||||
pool:
|
- script: npm install
|
||||||
vmImage: ubuntu-20.04
|
workingDirectory: asset-transfer-basic/rest-api-typescript
|
||||||
strategy:
|
displayName: Install REST Sample Dependencies
|
||||||
matrix:
|
- script: npm run build
|
||||||
Ledger-Go:
|
workingDirectory: asset-transfer-basic/rest-api-typescript
|
||||||
CHAINCODE_NAME: ledger
|
displayName: Build REST Sample Application
|
||||||
CHAINCODE_LANGUAGE: go
|
- script: npm test
|
||||||
Ledger-Javascript:
|
workingDirectory: asset-transfer-basic/rest-api-typescript
|
||||||
CHAINCODE_NAME: ledger
|
displayName: Test REST Sample Application
|
||||||
CHAINCODE_LANGUAGE: javascript
|
- script: |
|
||||||
steps:
|
docker build -t ghcr.io/hyperledger/fabric-rest-sample .
|
||||||
- template: templates/install-deps.yml
|
workingDirectory: asset-transfer-basic/rest-api-typescript
|
||||||
- script: ../ci/scripts/run-test-network-ledger.sh
|
displayName: Build REST Sample Docker Image
|
||||||
workingDirectory: test-network
|
- script: |
|
||||||
displayName: Run Test Network Ledger Chaincode
|
echo ${GITHUB_PAT} | docker login ghcr.io -u ${GITHUB_USER} --password-stdin
|
||||||
|
docker push ghcr.io/hyperledger/fabric-rest-sample:latest
|
||||||
- job: TestNetworkPrivate
|
condition: and(succeeded(),eq(variables['Build.Reason'], 'IndividualCI'))
|
||||||
displayName: Test Network
|
workingDirectory: asset-transfer-basic/rest-api-typescript
|
||||||
pool:
|
displayName: Publish REST Sample Docker Image
|
||||||
vmImage: ubuntu-20.04
|
env:
|
||||||
strategy:
|
GITHUB_USER: $(GITHUB_USER)
|
||||||
matrix:
|
GITHUB_PAT: $(GITHUB_PAT)
|
||||||
Private-Go:
|
|
||||||
CHAINCODE_NAME: private
|
|
||||||
CHAINCODE_LANGUAGE: go
|
|
||||||
steps:
|
|
||||||
- template: templates/install-deps.yml
|
|
||||||
- script: ../ci/scripts/run-test-network-private.sh
|
|
||||||
workingDirectory: test-network
|
|
||||||
displayName: Run Test Network Private Chaincode
|
|
||||||
|
|
||||||
- job: TestNetworkSBE
|
|
||||||
displayName: Test Network
|
|
||||||
pool:
|
|
||||||
vmImage: ubuntu-20.04
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
SBE-Typescript:
|
|
||||||
CHAINCODE_NAME: sbe
|
|
||||||
CHAINCODE_LANGUAGE: typescript
|
|
||||||
SBE-Java:
|
|
||||||
CHAINCODE_NAME: sbe
|
|
||||||
CHAINCODE_LANGUAGE: java
|
|
||||||
steps:
|
|
||||||
- template: templates/install-deps.yml
|
|
||||||
- script: ../ci/scripts/run-test-network-sbe.sh
|
|
||||||
workingDirectory: test-network
|
|
||||||
displayName: Run Test Network SBE Chaincode
|
|
||||||
|
|
||||||
- job: TestNetworkSecured
|
|
||||||
displayName: Test Network
|
|
||||||
pool:
|
|
||||||
vmImage: ubuntu-20.04
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
Secured-Go:
|
|
||||||
CHAINCODE_NAME: secured
|
|
||||||
CHAINCODE_LANGUAGE: go
|
|
||||||
steps:
|
|
||||||
- template: templates/install-deps.yml
|
|
||||||
- script: ../ci/scripts/run-test-network-secured.sh
|
|
||||||
workingDirectory: test-network
|
|
||||||
displayName: Run Test Network Secured Chaincode
|
|
||||||
|
|
||||||
- job: TestNetworkEvents
|
|
||||||
displayName: Test Network
|
|
||||||
pool:
|
|
||||||
vmImage: ubuntu-20.04
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
Events-Javascript:
|
|
||||||
CHAINCODE_NAME: events
|
|
||||||
CHAINCODE_LANGUAGE: javascript
|
|
||||||
Events-Java:
|
|
||||||
CHAINCODE_NAME: events
|
|
||||||
CHAINCODE_LANGUAGE: java
|
|
||||||
steps:
|
|
||||||
- template: templates/install-deps.yml
|
|
||||||
- script: ../ci/scripts/run-test-network-events.sh
|
|
||||||
workingDirectory: test-network
|
|
||||||
displayName: Run Test Network Events Chaincode
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: $(NODE_VER)
|
|
||||||
displayName: Install Node.js
|
|
||||||
- script: npm install
|
|
||||||
workingDirectory: asset-transfer-basic/rest-api-typescript
|
|
||||||
displayName: Install REST Sample Dependencies
|
|
||||||
- script: npm run build
|
|
||||||
workingDirectory: asset-transfer-basic/rest-api-typescript
|
|
||||||
displayName: Build REST Sample Application
|
|
||||||
- script: npm test
|
|
||||||
workingDirectory: asset-transfer-basic/rest-api-typescript
|
|
||||||
displayName: Test REST Sample Application
|
|
||||||
- script: |
|
|
||||||
docker build -t ghcr.io/hyperledger/fabric-rest-sample .
|
|
||||||
workingDirectory: asset-transfer-basic/rest-api-typescript
|
|
||||||
displayName: Build REST Sample Docker Image
|
|
||||||
- script: |
|
|
||||||
echo ${GITHUB_PAT} | docker login ghcr.io -u ${GITHUB_USER} --password-stdin
|
|
||||||
docker push ghcr.io/hyperledger/fabric-rest-sample:latest
|
|
||||||
condition: and(succeeded(),eq(variables['Build.Reason'], 'IndividualCI'))
|
|
||||||
workingDirectory: asset-transfer-basic/rest-api-typescript
|
|
||||||
displayName: Publish REST Sample Docker Image
|
|
||||||
env:
|
|
||||||
GITHUB_USER: $(GITHUB_USER)
|
|
||||||
GITHUB_PAT: $(GITHUB_PAT)
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- script: |
|
|
||||||
sudo apt install -y softhsm2
|
|
||||||
displayName: Install SoftHSM
|
|
||||||
- script: |
|
|
||||||
echo directories.tokendir = /tmp > $HOME/softhsm2.conf
|
|
||||||
export SOFTHSM2_CONF=$HOME/softhsm2.conf
|
|
||||||
softhsm2-util --init-token --slot 0 --label "ForFabric" --pin 98765432 --so-pin 1234
|
|
||||||
displayName: Set up SoftHSM
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: $(NODE_VER)
|
|
||||||
displayName: Install Node.js
|
|
||||||
- script: curl -L --retry 5 --retry-delay 3 https://hyperledger.jfrog.io/hyperledger/fabric-binaries/hyperledger-fabric-linux-amd64-${FABRIC_VERSION}-stable.tar.gz | tar xz
|
|
||||||
displayName: Download Fabric CLI
|
|
||||||
- script: curl -L --retry 5 --retry-delay 3 https://hyperledger.jfrog.io/hyperledger/fabric-binaries/hyperledger-fabric-ca-linux-amd64-${FABRIC_VERSION}-stable.tar.gz | tar xz
|
|
||||||
displayName: Download Fabric CA CLI
|
|
||||||
- script: curl https://raw.githubusercontent.com/kadwanev/retry/master/retry -o ./bin/retry && chmod +x ./bin/retry
|
|
||||||
displayName: Install retry CLI
|
|
||||||
- script: ./ci/scripts/pullFabricImages.sh
|
|
||||||
displayName: Pull Fabric Docker Imagess
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: $(NODE_VER)
|
|
||||||
displayName: Install Node.js
|
|
||||||
Loading…
Reference in a new issue