mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-26 03:25:09 +00:00
ci pipeline changes
Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>
This commit is contained in:
parent
f5322c8b0b
commit
8e831283b0
4 changed files with 35 additions and 11 deletions
|
|
@ -166,9 +166,3 @@ bccsp:
|
||||||
Label: ForFabric
|
Label: ForFabric
|
||||||
hash: SHA2
|
hash: SHA2
|
||||||
security: 256
|
security: 256
|
||||||
# sw:
|
|
||||||
# hash: SHA2
|
|
||||||
# security: 256
|
|
||||||
# filekeystore:
|
|
||||||
# # The directory used for the software file-based keystore
|
|
||||||
# keystore: msp/keystore
|
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,12 @@ echo 'directory' $PWD
|
||||||
CLIENT_CONFIG_TEMPLATE=../ca-client-config/fabric-ca-client-config-template.yaml
|
CLIENT_CONFIG_TEMPLATE=../ca-client-config/fabric-ca-client-config-template.yaml
|
||||||
CLIENT_CONFIG=../ca-client-config/fabric-ca-client-config.yaml
|
CLIENT_CONFIG=../ca-client-config/fabric-ca-client-config.yaml
|
||||||
cp $CLIENT_CONFIG_TEMPLATE $CLIENT_CONFIG
|
cp $CLIENT_CONFIG_TEMPLATE $CLIENT_CONFIG
|
||||||
sed -i '' -e s+REPLACE_ME_HSMLIB+${HSM2_LIB}+g $CLIENT_CONFIG
|
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
sed -i '' s+REPLACE_ME_HSMLIB+${HSM2_LIB}+g $CLIENT_CONFIG
|
||||||
|
else
|
||||||
|
sed -i s+REPLACE_ME_HSMLIB+${HSM2_LIB}+g $CLIENT_CONFIG
|
||||||
|
fi
|
||||||
|
|
||||||
# create the users, remove any existing users
|
# create the users, remove any existing users
|
||||||
CRYPTO_PATH=$PWD/../crypto-material/hsm
|
CRYPTO_PATH=$PWD/../crypto-material/hsm
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
directories.tokendir = /tmp/
|
||||||
|
objectstore.backend = file
|
||||||
|
|
||||||
|
# ERROR, WARNING, INFO, DEBUG
|
||||||
|
log.level = INFO
|
||||||
|
|
@ -103,13 +103,17 @@ node dist/app.js
|
||||||
popd
|
popd
|
||||||
stopNetwork
|
stopNetwork
|
||||||
|
|
||||||
# Run typescript HSM gateway application
|
# Run Typescript HSM gateway application
|
||||||
createNetwork
|
createNetwork
|
||||||
print "Initializing Typescript HSM gateway application"
|
print "Initializing Typescript HSM gateway application"
|
||||||
pushd ../asset-transfer-basic/application-typescript-hsm
|
pushd ../asset-transfer-basic/application-gateway-hsm/
|
||||||
print "Setup SoftHSM"
|
print "Setup SoftHSM"
|
||||||
export SOFTHSM2_CONF=$PWD/softhsm2.conf
|
export SOFTHSM2_CONF=$PWD/softhsm2.conf
|
||||||
softhsm2-util --init-token --slot 0 --label "ForFabric" --pin 98765432 --so-pin 1234
|
softhsm2-util --init-token --slot 1 --label "ForFabric" --pin 98765432 --so-pin 1234
|
||||||
|
pushd scripts
|
||||||
|
print "Enroll and register User in HSM"
|
||||||
|
./generate-hsm-user.sh HSMUser
|
||||||
|
pushd ../node
|
||||||
print "install dependencies"
|
print "install dependencies"
|
||||||
npm install
|
npm install
|
||||||
print "Building app.ts"
|
print "Building app.ts"
|
||||||
|
|
@ -119,6 +123,22 @@ node dist/app.js
|
||||||
popd
|
popd
|
||||||
stopNetwork
|
stopNetwork
|
||||||
|
|
||||||
|
# Run Go HSM gateway application
|
||||||
|
createNetwork
|
||||||
|
print "Initializing Go HSM gateway application"
|
||||||
|
pushd ../asset-transfer-basic/application-gateway-hsm/
|
||||||
|
print "Setup SoftHSM"
|
||||||
|
export SOFTHSM2_CONF=$PWD/softhsm2.conf
|
||||||
|
softhsm2-util --init-token --slot 2 --label "ForFabric" --pin 98765432 --so-pin 1234
|
||||||
|
pushd scripts
|
||||||
|
print "Register and enroll user in HSM"
|
||||||
|
./generate-hsm-user.sh HSMUser
|
||||||
|
pushd ../go
|
||||||
|
print "Running the output app"
|
||||||
|
go run -tags pkcs11 hsm-sample.go
|
||||||
|
popd
|
||||||
|
stopNetwork
|
||||||
|
|
||||||
# Run Go gateway application
|
# Run Go gateway application
|
||||||
createNetwork
|
createNetwork
|
||||||
print "Initializing Go gateway application"
|
print "Initializing Go gateway application"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue