Skip to content

Commit

Permalink
exported krew PATH in different steps
Browse files Browse the repository at this point in the history
Signed-off-by: jnjerin <[email protected]>
  • Loading branch information
jnjerin committed Nov 17, 2023
1 parent cd96481 commit 52ab4bb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/test-kubectl-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ jobs:
- name: Create Peer org
run: |
export PATH="$HOME/.krew/bin:$HOME/.istio/bin:$PATH"
kubectl hlf
export PEER_IMAGE=hyperledger/fabric-peer
export PEER_VERSION=2.5.0
Expand All @@ -205,6 +206,7 @@ jobs:
- name: Create Orderer Org
run: |
export PATH="$HOME/.krew/bin:$HOME/.istio/bin:$PATH"
export ORDERER_IMAGE=hyperledger/fabric-orderer
export ORDERER_VERSION=2.5.0
Expand All @@ -224,6 +226,7 @@ jobs:
kubectl wait --timeout=180s --for=condition=Running fabricorderernodes.hlf.kungfusoftware.es --all
- name: Prepare Connection string for Orderer Node
run: |
export PATH="$HOME/.krew/bin:$HOME/.istio/bin:$PATH"
kubectl hlf inspect --output ordservice.yaml -o OrdererMSP
kubectl hlf ca register --name=ord-ca --user=admin --secret=adminpw \
--type=admin --enroll-id enroll --enroll-secret=enrollpw --mspid=OrdererMSP
Expand All @@ -235,13 +238,15 @@ jobs:
- name: Prepare credentials for orderer
run: |
export PATH="$HOME/.krew/bin:$HOME/.istio/bin:$PATH"
# enroll using the TLS CA
kubectl hlf ca enroll --name=ord-ca --namespace=default --user=admin --secret=adminpw --mspid OrdererMSP \
--ca-name tlsca --output admin-tls-ordservice.yaml
- name: Prepare connection string for Peer
run: |
export PATH="$HOME/.krew/bin:$HOME/.istio/bin:$PATH"
kubectl hlf ca register --name=org1-ca --user=admin --secret=adminpw --type=admin \
--enroll-id enroll --enroll-secret=enrollpw --mspid Org1MSP
Expand All @@ -254,7 +259,7 @@ jobs:
kubectl hlf utils adduser --userPath=peer-org1.yaml --config=org1.yaml --username=admin --mspid=Org1MSP
- name: Create a channel
run: |
export PATH="$HOME/.krew/bin:$HOME/.istio/bin:$PATH"
kubectl create secret generic wallet --namespace=default \
--from-file=peer-org1.yaml=$PWD/peer-org1.yaml \
--from-file=admin-tls-ordservice.yaml=$PWD/admin-tls-ordservice.yaml
Expand All @@ -279,6 +284,7 @@ jobs:
- name: Join peers to channel
run: |
export PATH="$HOME/.krew/bin:$HOME/.istio/bin:$PATH"
kubectl get fabricorderernodes ord-node1 -o jsonpath='{.status.tlsCert}' > ./orderer-cert.pem
kubectl hlf channelcrd follower create \
--channel-name=demo \
Expand All @@ -295,6 +301,7 @@ jobs:
kubectl wait --timeout=180s --for=condition=Created fabricfollowerchannels.hlf.kungfusoftware.es --all
- name: Get channel
run: |
export PATH="$HOME/.krew/bin:$HOME/.istio/bin:$PATH"
sleep 3
kubectl hlf channel inspect --channel=demo --config=org1.yaml \
Expand All @@ -303,6 +310,7 @@ jobs:
cat demo.json
- name: Install/Approve/Commit chaincode
run: |
export PATH="$HOME/.krew/bin:$HOME/.istio/bin:$PATH"
# remove the code.tar.gz asset-transfer-basic-external.tgz if they exist
export CHAINCODE_NAME=asset
export CHAINCODE_LABEL=asset
Expand Down Expand Up @@ -348,6 +356,7 @@ jobs:
- name: Test chaincode
run: |
export PATH="$HOME/.krew/bin:$HOME/.istio/bin:$PATH"
sleep 10
echo "waiting for deployment to be ready"
kubectl wait --timeout=180s --for=condition=Available deployment asset --namespace=default
Expand All @@ -364,6 +373,7 @@ jobs:
- name: Show information
if: ${{ failure() }}
run: |
export PATH="$HOME/.krew/bin:$HOME/.istio/bin:$PATH"
kubectl get nodes -o=wide
kubectl get pods -o=wide -A
kubectl get crds
Expand Down

0 comments on commit 52ab4bb

Please sign in to comment.