mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-22 01:25:10 +00:00
Fix build failure in full-stack-asset-transfer
A typo in the 10-appdev-e2e.sh script caused the shell to exit with an error status, and the killall command appears to match some key processes in the runner so removing. Also: - Update sample application and smart contract to Node 18, using the latest fabric-contact-api release. - Use release versions of Fabric v2.5 and update tool versions in workflow set up. - Use GitHub Action to install just instead of curl of install script. Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
This commit is contained in:
parent
36ad010124
commit
3eaabe789c
10 changed files with 27 additions and 30 deletions
14
.github/actions/fsat-setup/action.yaml
vendored
14
.github/actions/fsat-setup/action.yaml
vendored
|
|
@ -3,19 +3,19 @@ description: Set up the Full Stack Asset Transfer Guide Dependencies
|
||||||
inputs:
|
inputs:
|
||||||
node-version:
|
node-version:
|
||||||
description: Version of node
|
description: Version of node
|
||||||
default: 16.x
|
default: 18.x
|
||||||
just-version:
|
just-version:
|
||||||
description: Just Version
|
description: Just Version
|
||||||
default: 1.2.0
|
default: '1.13.0'
|
||||||
k9s-version:
|
k9s-version:
|
||||||
description: k9s Version
|
description: k9s Version
|
||||||
default: v0.25.3
|
default: v0.25.3
|
||||||
fabric-version:
|
fabric-version:
|
||||||
description: Version of Hyperledger Fabric
|
description: Version of Hyperledger Fabric
|
||||||
default: 2.5.0-alpha3
|
default: '2.5.0'
|
||||||
ca-version:
|
ca-version:
|
||||||
description: Version of Hyperledger Fabric CA
|
description: Version of Hyperledger Fabric CA
|
||||||
default: 1.5.6-beta3
|
default: '1.5.6'
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
|
|
@ -35,9 +35,9 @@ runs:
|
||||||
sudo chmod 755 /usr/local/bin/k9s
|
sudo chmod 755 /usr/local/bin/k9s
|
||||||
|
|
||||||
- name: Install just
|
- name: Install just
|
||||||
shell: bash
|
uses: extractions/setup-just@v1
|
||||||
run: |
|
with:
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --tag ${{ inputs.just-version }} --to /usr/local/bin
|
just-version: ${{ inputs.just-version }}
|
||||||
|
|
||||||
- name: Install weft
|
- name: Install weft
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ inputs:
|
||||||
default: 1.19.6
|
default: 1.19.6
|
||||||
node-version:
|
node-version:
|
||||||
description: Version of node
|
description: Version of node
|
||||||
default: 16.x
|
default: 18.x
|
||||||
java-version:
|
java-version:
|
||||||
description: Version of JDK
|
description: Version of JDK
|
||||||
default: 11.x
|
default: 11.x
|
||||||
|
|
|
||||||
2
.github/workflows/lint.yaml
vendored
2
.github/workflows/lint.yaml
vendored
|
|
@ -17,7 +17,7 @@ concurrency:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GO_VER: 1.19.6
|
GO_VER: 1.19.6
|
||||||
NODE_VER: 16.x
|
NODE_VER: 18.x
|
||||||
JAVA_VER: 11.x
|
JAVA_VER: 11.x
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
|
||||||
2
.github/workflows/rest-sample.yaml
vendored
2
.github/workflows/rest-sample.yaml
vendored
|
|
@ -5,7 +5,7 @@ name: REST Sample 🐧
|
||||||
run-name: ${{ github.actor }} is testing the REST Sample 🐧
|
run-name: ${{ github.actor }} is testing the REST Sample 🐧
|
||||||
|
|
||||||
env:
|
env:
|
||||||
NODE_VER: 16.x
|
NODE_VER: 18.x
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.13.0"
|
"node": ">=18.12.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
|
|
@ -22,11 +22,11 @@
|
||||||
"@hyperledger/fabric-gateway": "^1.1.0"
|
"@hyperledger/fabric-gateway": "^1.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tsconfig/node16": "^1.0.3",
|
"@tsconfig/node18": "^2.0.0",
|
||||||
"@types/node": "^16.11.46",
|
"@types/node": "^18.16.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.22.0",
|
"@typescript-eslint/eslint-plugin": "^5.22.0",
|
||||||
"@typescript-eslint/parser": "^5.22.0",
|
"@typescript-eslint/parser": "^5.22.0",
|
||||||
"eslint": "^8.14.0",
|
"eslint": "^8.14.0",
|
||||||
"typescript": "~4.7.4"
|
"typescript": "~5.0.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://json.schemastore.org/tsconfig",
|
"$schema": "https://json.schemastore.org/tsconfig",
|
||||||
"extends": "@tsconfig/node16/tsconfig.json",
|
"extends": "@tsconfig/node18/tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
FROM node:16.14 AS builder
|
FROM node:18.16 AS builder
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
|
@ -12,7 +12,7 @@ RUN npm install
|
||||||
RUN npm run build && npm shrinkwrap
|
RUN npm run build && npm shrinkwrap
|
||||||
|
|
||||||
|
|
||||||
FROM node:16.14 as prod-builder
|
FROM node:18.16 as prod-builder
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
COPY --chown=node:node --from=builder /usr/src/app/dist ./dist
|
COPY --chown=node:node --from=builder /usr/src/app/dist ./dist
|
||||||
COPY --chown=node:node --from=builder /usr/src/app/package.json ./
|
COPY --chown=node:node --from=builder /usr/src/app/package.json ./
|
||||||
|
|
@ -21,7 +21,7 @@ RUN npm ci --omit=dev && npm cache clean --force
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Builds the Chaincode as a Service docker version
|
# Builds the Chaincode as a Service docker version
|
||||||
FROM node:16.14 AS ccaas
|
FROM node:18.16 AS ccaas
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
|
|
@ -47,7 +47,7 @@ ENTRYPOINT [ "/tini", "--", "/usr/src/app/docker-entrypoint.sh" ]
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Builds the chaincode for the k8s builder
|
# Builds the chaincode for the k8s builder
|
||||||
FROM node:16.14 AS k8s
|
FROM node:18.16 AS k8s
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16"
|
"node": ">=18.12.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint ./src --ext .ts",
|
"lint": "eslint ./src --ext .ts",
|
||||||
|
|
@ -26,18 +26,18 @@
|
||||||
"author": "Hyperledger",
|
"author": "Hyperledger",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fabric-contract-api": "~2.5.2",
|
"fabric-contract-api": "~2.5.3",
|
||||||
"fabric-shim": "~2.5.2",
|
"fabric-shim": "~2.5.3",
|
||||||
"json-stringify-deterministic": "^1.0.7",
|
"json-stringify-deterministic": "^1.0.7",
|
||||||
"sort-keys-recursive": "^2.1.7"
|
"sort-keys-recursive": "^2.1.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tsconfig/node16": "^1.0.3",
|
"@tsconfig/node18": "^2.0.0",
|
||||||
"@types/node": "^16.11.46",
|
"@types/node": "^18.16.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.30.7",
|
"@typescript-eslint/eslint-plugin": "^5.30.7",
|
||||||
"@typescript-eslint/parser": "^5.30.7",
|
"@typescript-eslint/parser": "^5.30.7",
|
||||||
"eslint": "^8.20.0",
|
"eslint": "^8.20.0",
|
||||||
"typescript": "~4.7.4"
|
"typescript": "~5.0.4"
|
||||||
},
|
},
|
||||||
"nyc": {
|
"nyc": {
|
||||||
"extension": [
|
"extension": [
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://json.schemastore.org/tsconfig",
|
"$schema": "https://json.schemastore.org/tsconfig",
|
||||||
"extends": "@tsconfig/node16/tsconfig.json",
|
"extends": "@tsconfig/node18/tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
|
|
|
||||||
|
|
@ -11,16 +11,13 @@ export FABRIC_CFG_PATH="${WORKSHOP_PATH}/config"
|
||||||
|
|
||||||
"${WORKSHOP_PATH}/check.sh"
|
"${WORKSHOP_PATH}/check.sh"
|
||||||
|
|
||||||
CHAINDODE_PID=
|
CHAINCODE_PID=
|
||||||
|
|
||||||
function exitHook() {
|
function exitHook() {
|
||||||
|
|
||||||
# shut down the npm run
|
# shut down the npm run
|
||||||
[ -n "${CHAINCODE_PID}" ] && kill "${CHAINCODE_PID}"
|
[ -n "${CHAINCODE_PID}" ] && kill "${CHAINCODE_PID}"
|
||||||
|
|
||||||
# and node children spawned by npm. This could be improved by scraping out the pid for the target node command.
|
|
||||||
[ -n "${CHAINCODE_PID}" ] && killall node
|
|
||||||
|
|
||||||
# Shut down microfab
|
# Shut down microfab
|
||||||
docker kill microfab &> /dev/null
|
docker kill microfab &> /dev/null
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue