Skip to content

Commit 9dec525

Browse files
authored
Merge pull request #261 from sanvenDev/main
Making Interop SDK Hash Extensible
2 parents 55793db + f397c96 commit 9dec525

File tree

124 files changed

+2587
-1082
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+2587
-1082
lines changed

.github/workflows/deploy_corda-pkgs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ jobs:
105105
working-directory: sdks/corda
106106

107107
publish-driver:
108-
needs: [publish-protos, publish-interop-app]
108+
if: github.repository_owner == 'hyperledger-labs'
109+
needs: [publish-protos, publish-interop-app, publish-sdk]
109110
runs-on: ubuntu-latest
110111
steps:
111112
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it

.github/workflows/deploy_fabric-pkgs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414

1515
jobs:
1616
publish-protos:
17+
if: github.repository_owner == 'hyperledger-labs'
1718
runs-on: ubuntu-latest
1819
steps:
1920
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
@@ -47,6 +48,7 @@ jobs:
4748
working-directory: common/protos-js
4849

4950
publish-sdk:
51+
if: github.repository_owner == 'hyperledger-labs'
5052
needs: [publish-protos]
5153
runs-on: ubuntu-latest
5254
steps:
@@ -74,6 +76,7 @@ jobs:
7476
working-directory: sdks/fabric/interoperation-node-sdk
7577

7678
publish-driver:
79+
if: github.repository_owner == 'hyperledger-labs'
7780
needs: [publish-protos]
7881
runs-on: ubuntu-latest
7982
steps:
@@ -93,7 +96,7 @@ jobs:
9396
sed -i "s/<personal-access-token>/${{ secrets.GITHUB_TOKEN }}/g" .npmrc
9497
cat .npmrc
9598
working-directory: core/drivers/fabric-driver
96-
99+
97100
- name: Build and Push
98101
run: make push-image
99102
working-directory: core/drivers/fabric-driver

.github/workflows/deploy_relay-server.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212

1313
jobs:
1414
relay-image:
15+
if: github.repository_owner == 'hyperledger-labs'
1516
runs-on: ubuntu-latest
1617
steps:
1718
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it

.github/workflows/test_asset-exchange-corda.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ jobs:
3232
distribution: 'adopt'
3333

3434
# CORDA NETWORK
35-
- name: Generate github.properties (on pull_request)
36-
if: ${{ github.event_name == 'pull_request' }}
35+
- name: Generate github.properties
3736
run: |
3837
echo "Using ${GITHUB_ACTOR} user."
3938
echo "username=${GITHUB_ACTOR}" >> github.properties
@@ -49,16 +48,6 @@ jobs:
4948
5049
cat github.properties
5150
working-directory: tests/network-setups/corda
52-
53-
- name: Generate github.properties (else)
54-
if: ${{ github.event_name != 'pull_request' }}
55-
run: |
56-
echo "Using ${GITHUB_ACTOR} user."
57-
echo "username=${GITHUB_ACTOR}" >> github.properties
58-
echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties
59-
echo "url=https://maven.pkg.github.com/hyperledger-labs/weaver-dlt-interoperability" >> github.properties
60-
cat github.properties
61-
working-directory: tests/network-setups/corda
6251

6352
# CORDA NETWORK
6453
- name: Start Corda Network
@@ -239,8 +228,7 @@ jobs:
239228
distribution: 'adopt'
240229

241230
# CORDA NETWORK
242-
- name: Generate github.properties (on pull_request)
243-
if: ${{ github.event_name == 'pull_request' }}
231+
- name: Generate github.properties
244232
run: |
245233
echo "Using ${GITHUB_ACTOR} user."
246234
echo "username=${GITHUB_ACTOR}" >> github.properties
@@ -255,18 +243,6 @@ jobs:
255243
./scripts/get-cordapps.sh || mv github.main.properties github.properties
256244
257245
cat github.properties
258-
cp github.properties ../../../samples/corda/corda-simple-application/
259-
working-directory: tests/network-setups/corda
260-
261-
- name: Generate github.properties (else)
262-
if: ${{ github.event_name != 'pull_request' }}
263-
run: |
264-
echo "Using ${GITHUB_ACTOR} user."
265-
echo "username=${GITHUB_ACTOR}" >> github.properties
266-
echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties
267-
echo "url=https://maven.pkg.github.com/hyperledger-labs/weaver-dlt-interoperability" >> github.properties
268-
cat github.properties
269-
cp github.properties ../../../samples/corda/corda-simple-application/
270246
working-directory: tests/network-setups/corda
271247

272248
# CORDA NETWORK

.github/workflows/test_asset-exchange-fabric.yml

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
jobs:
1818

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

@@ -91,7 +91,7 @@ jobs:
9191
working-directory: samples/fabric/fabric-cli
9292

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

@@ -135,36 +135,39 @@ jobs:
135135

136136
# FABRIC NETWORK
137137
# Use local InteropCC as Remote with go.mod instead of go.mod.local
138-
- name: Setup interopcc
138+
- name: Fetch interopcc
139139
run: |
140-
GOMODCACHE=`go env GOMODCACHE`
141-
echo "GO MOD Path: ${GOMODCACHE}"
140+
TMP_PATH=$PWD/../../../tests/network-setups/fabric/shared/tmp
141+
mkdir -p $TMP_PATH
142+
OLD_GOPATH=$GOPATH
143+
export GOPATH=$TMP_PATH
144+
echo "GO Path: ${GOPATH}"
142145
go get -d github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts/interop
143-
chmod +wr -R ${GOMODCACHE}
144-
rm -rf ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts/interop*/*
145-
cp -r contracts/interop/* ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts/interop*/
146-
ls -lh ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts/interop*
146+
chmod +wr -R $TMP_PATH/pkg/mod
147+
ls -lh $TMP_PATH/pkg/mod/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts
148+
rm -rf $TMP_PATH/pkg/mod/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts/interop*/*
149+
cp -r contracts/interop/* $TMP_PATH/pkg/mod/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts/interop*/
150+
ls -lh $TMP_PATH/pkg/mod/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts/interop*
151+
export GOPATH=$OLD_GOPATH
147152
working-directory: core/network/fabric-interop-cc
153+
154+
- name: Setup Interopcc
155+
run: |
156+
cd interop*
157+
go mod vendor
158+
ROOT_DIR=../../../../../../../../../../../../../../..
159+
cp -r $ROOT_DIR/common/protos-go/* vendor/github.com/hyperledger-labs/weaver-dlt-interoperability/common/protos-go/
160+
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/
161+
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/
162+
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/
163+
working-directory: tests/network-setups/fabric/shared/tmp/pkg/mod/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts
148164

149165
- name: Setup Simpleasset
150166
run: |
151-
GOMODCACHE=`go env GOMODCACHE`
152-
echo "GO MOD Path: ${GOMODCACHE}"
153-
go mod download github.com/hyperledger-labs/weaver-dlt-interoperability/common/protos-go
154-
chmod +wr -R ${GOMODCACHE}
155-
rm -rf ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/common/protos-go*/*
156-
cp -r ../../../common/protos-go/* ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/common/protos-go*/
157-
ls -lh ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/common/protos-go*
158-
go mod download github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/interfaces/asset-mgmt
159-
chmod +wr -R ${GOMODCACHE}
160-
rm -rf ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/interfaces/asset-mgmt*/*
161-
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*/
162-
ls -lh ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/interfaces/asset-mgmt*
163-
go mod download github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/libs/testutils
164-
chmod +wr -R ${GOMODCACHE}
165-
rm -rf ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/libs/testutils*/*
166-
cp -r ../../../core/network/fabric-interop-cc/libs/testutils/* ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/libs/testutils*/
167-
ls -lh ${GOMODCACHE}/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/libs/testutils*
167+
go mod vendor
168+
cp -r ../../../common/protos-go/* vendor/github.com/hyperledger-labs/weaver-dlt-interoperability/common/protos-go/
169+
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/
170+
cp -r ../../../core/network/fabric-interop-cc/libs/testutils/* vendor/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/libs/testutils/
168171
working-directory: samples/fabric/simpleasset
169172

170173
- name: Start Fabric Network

0 commit comments

Comments
 (0)