Skip to content

Commit

Permalink
Merge pull request #261 from sanvenDev/main
Browse files Browse the repository at this point in the history
Making Interop SDK Hash Extensible
  • Loading branch information
sandeepnRES authored Jun 1, 2022
2 parents 55793db + f397c96 commit 9dec525
Show file tree
Hide file tree
Showing 124 changed files with 2,587 additions and 1,082 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deploy_corda-pkgs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ jobs:
working-directory: sdks/corda

publish-driver:
needs: [publish-protos, publish-interop-app]
if: github.repository_owner == 'hyperledger-labs'
needs: [publish-protos, publish-interop-app, publish-sdk]
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/deploy_fabric-pkgs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

jobs:
publish-protos:
if: github.repository_owner == 'hyperledger-labs'
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand Down Expand Up @@ -47,6 +48,7 @@ jobs:
working-directory: common/protos-js

publish-sdk:
if: github.repository_owner == 'hyperledger-labs'
needs: [publish-protos]
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -74,6 +76,7 @@ jobs:
working-directory: sdks/fabric/interoperation-node-sdk

publish-driver:
if: github.repository_owner == 'hyperledger-labs'
needs: [publish-protos]
runs-on: ubuntu-latest
steps:
Expand All @@ -93,7 +96,7 @@ jobs:
sed -i "s/<personal-access-token>/${{ secrets.GITHUB_TOKEN }}/g" .npmrc
cat .npmrc
working-directory: core/drivers/fabric-driver

- name: Build and Push
run: make push-image
working-directory: core/drivers/fabric-driver
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy_relay-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:

jobs:
relay-image:
if: github.repository_owner == 'hyperledger-labs'
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand Down
28 changes: 2 additions & 26 deletions .github/workflows/test_asset-exchange-corda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ jobs:
distribution: 'adopt'

# CORDA NETWORK
- name: Generate github.properties (on pull_request)
if: ${{ github.event_name == 'pull_request' }}
- name: Generate github.properties
run: |
echo "Using ${GITHUB_ACTOR} user."
echo "username=${GITHUB_ACTOR}" >> github.properties
Expand All @@ -49,16 +48,6 @@ jobs:
cat github.properties
working-directory: tests/network-setups/corda

- name: Generate github.properties (else)
if: ${{ github.event_name != 'pull_request' }}
run: |
echo "Using ${GITHUB_ACTOR} user."
echo "username=${GITHUB_ACTOR}" >> github.properties
echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties
echo "url=https://maven.pkg.github.com/hyperledger-labs/weaver-dlt-interoperability" >> github.properties
cat github.properties
working-directory: tests/network-setups/corda

# CORDA NETWORK
- name: Start Corda Network
Expand Down Expand Up @@ -239,8 +228,7 @@ jobs:
distribution: 'adopt'

# CORDA NETWORK
- name: Generate github.properties (on pull_request)
if: ${{ github.event_name == 'pull_request' }}
- name: Generate github.properties
run: |
echo "Using ${GITHUB_ACTOR} user."
echo "username=${GITHUB_ACTOR}" >> github.properties
Expand All @@ -255,18 +243,6 @@ jobs:
./scripts/get-cordapps.sh || mv github.main.properties github.properties
cat github.properties
cp github.properties ../../../samples/corda/corda-simple-application/
working-directory: tests/network-setups/corda

- name: Generate github.properties (else)
if: ${{ github.event_name != 'pull_request' }}
run: |
echo "Using ${GITHUB_ACTOR} user."
echo "username=${GITHUB_ACTOR}" >> github.properties
echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties
echo "url=https://maven.pkg.github.com/hyperledger-labs/weaver-dlt-interoperability" >> github.properties
cat github.properties
cp github.properties ../../../samples/corda/corda-simple-application/
working-directory: tests/network-setups/corda

# CORDA NETWORK
Expand Down
55 changes: 29 additions & 26 deletions .github/workflows/test_asset-exchange-fabric.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
jobs:

asset-exchange-fabric:
if: ${{ false }} # disable for now
if: ${{ false }} # disable
# The type of runner that the job will run on
runs-on: ubuntu-latest

Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
working-directory: samples/fabric/fabric-cli

asset-exchange-fabric-semi-local:
if: ${{ false }} # disable for now
# if: ${{ false }} # disable
# The type of runner that the job will run on
runs-on: ubuntu-latest

Expand Down Expand Up @@ -135,36 +135,39 @@ jobs:

# FABRIC NETWORK
# Use local InteropCC as Remote with go.mod instead of go.mod.local
- name: Setup interopcc
- name: Fetch interopcc
run: |
GOMODCACHE=`go env GOMODCACHE`
echo "GO MOD Path: ${GOMODCACHE}"
TMP_PATH=$PWD/../../../tests/network-setups/fabric/shared/tmp
mkdir -p $TMP_PATH
OLD_GOPATH=$GOPATH
export GOPATH=$TMP_PATH
echo "GO Path: ${GOPATH}"
go get -d github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts/interop
chmod +wr -R ${GOMODCACHE}
rm -rf ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts/interop*/*
cp -r contracts/interop/* ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts/interop*/
ls -lh ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts/interop*
chmod +wr -R $TMP_PATH/pkg/mod
ls -lh $TMP_PATH/pkg/mod/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts
rm -rf $TMP_PATH/pkg/mod/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts/interop*/*
cp -r contracts/interop/* $TMP_PATH/pkg/mod/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts/interop*/
ls -lh $TMP_PATH/pkg/mod/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts/interop*
export GOPATH=$OLD_GOPATH
working-directory: core/network/fabric-interop-cc

- name: Setup Interopcc
run: |
cd interop*
go mod vendor
ROOT_DIR=../../../../../../../../../../../../../../..
cp -r $ROOT_DIR/common/protos-go/* vendor/github.com/hyperledger-labs/weaver-dlt-interoperability/common/protos-go/
cp -r $ROOT_DIR/core/network/fabric-interop-cc/libs/assetexchange/* vendor/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/libs/assetexchange/
cp -r $ROOT_DIR/core/network/fabric-interop-cc/libs/utils/* vendor/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/libs/utils/
cp -r $ROOT_DIR/core/network/fabric-interop-cc/libs/testutils/* vendor/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/libs/testutils/
working-directory: tests/network-setups/fabric/shared/tmp/pkg/mod/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts

- name: Setup Simpleasset
run: |
GOMODCACHE=`go env GOMODCACHE`
echo "GO MOD Path: ${GOMODCACHE}"
go mod download github.com/hyperledger-labs/weaver-dlt-interoperability/common/protos-go
chmod +wr -R ${GOMODCACHE}
rm -rf ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/common/protos-go*/*
cp -r ../../../common/protos-go/* ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/common/protos-go*/
ls -lh ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/common/protos-go*
go mod download github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/interfaces/asset-mgmt
chmod +wr -R ${GOMODCACHE}
rm -rf ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/interfaces/asset-mgmt*/*
cp -r ../../../core/network/fabric-interop-cc/interfaces/asset-mgmt/* ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/interfaces/asset-mgmt*/
ls -lh ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/interfaces/asset-mgmt*
go mod download github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/libs/testutils
chmod +wr -R ${GOMODCACHE}
rm -rf ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/libs/testutils*/*
cp -r ../../../core/network/fabric-interop-cc/libs/testutils/* ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/libs/testutils*/
ls -lh ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/libs/testutils*
go mod vendor
cp -r ../../../common/protos-go/* vendor/github.com/hyperledger-labs/weaver-dlt-interoperability/common/protos-go/
cp -r ../../../core/network/fabric-interop-cc/interfaces/asset-mgmt/* vendor/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/interfaces/asset-mgmt/
cp -r ../../../core/network/fabric-interop-cc/libs/testutils/* vendor/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/libs/testutils/
working-directory: samples/fabric/simpleasset

- name: Start Fabric Network
Expand Down
Loading

0 comments on commit 9dec525

Please sign in to comment.