Skip to content

Commit

Permalink
add optional extra arguments to lifecycle commands for more flexibility
Browse files Browse the repository at this point in the history
Signed-off-by: Arne Rutjes <[email protected]>
  • Loading branch information
arner authored and denyeart committed Feb 9, 2024
1 parent 02d9f8c commit a708af9
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test-network-k8s/scripts/chaincode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ function query_chaincode() {
peer chaincode query \
-n $cc_name \
-C $CHANNEL_NAME \
-c $@
-c $@ \
${QUERY_EXTRA_ARGS}
}

function query_chaincode_metadata() {
Expand Down Expand Up @@ -186,7 +187,8 @@ function invoke_chaincode() {
-c $@ \
--orderer org0-orderer1.${DOMAIN}:${NGINX_HTTPS_PORT} \
--connTimeout ${ORDERER_TIMEOUT} \
--tls --cafile ${TEMP_DIR}/channel-msp/ordererOrganizations/org0/orderers/org0-orderer1/tls/signcerts/tls-cert.pem
--tls --cafile ${TEMP_DIR}/channel-msp/ordererOrganizations/org0/orderers/org0-orderer1/tls/signcerts/tls-cert.pem \
${INVOKE_EXTRA_ARGS}

sleep 2
}
Expand Down Expand Up @@ -324,7 +326,7 @@ function install_chaincode_for() {

export_peer_context $org $peer

peer lifecycle chaincode install $cc_package
peer lifecycle chaincode install $cc_package ${INSTALL_EXTRA_ARGS}

pop_fn
}
Expand Down Expand Up @@ -357,7 +359,8 @@ function approve_chaincode() {
--sequence 1 \
--orderer org0-orderer1.${DOMAIN}:${NGINX_HTTPS_PORT} \
--connTimeout ${ORDERER_TIMEOUT} \
--tls --cafile ${TEMP_DIR}/channel-msp/ordererOrganizations/org0/orderers/org0-orderer1/tls/signcerts/tls-cert.pem
--tls --cafile ${TEMP_DIR}/channel-msp/ordererOrganizations/org0/orderers/org0-orderer1/tls/signcerts/tls-cert.pem \
${APPROVE_EXTRA_ARGS}

pop_fn
}
Expand All @@ -379,7 +382,8 @@ function commit_chaincode() {
--sequence 1 \
--orderer org0-orderer1.${DOMAIN}:${NGINX_HTTPS_PORT} \
--connTimeout ${ORDERER_TIMEOUT} \
--tls --cafile ${TEMP_DIR}/channel-msp/ordererOrganizations/org0/orderers/org0-orderer1/tls/signcerts/tls-cert.pem
--tls --cafile ${TEMP_DIR}/channel-msp/ordererOrganizations/org0/orderers/org0-orderer1/tls/signcerts/tls-cert.pem \
${COMMIT_EXTRA_ARGS}

pop_fn
}
Expand Down

0 comments on commit a708af9

Please sign in to comment.