Skip to content

Commit fe20d5e

Browse files
committed
Merge branch 'main' into feat/channel-invitation-workflow-part-2
Signed-off-by: Pranav dhiran <dhiranpranav72@gmail.com>
1 parent 8d4ed7c commit fe20d5e

10 files changed

Lines changed: 117 additions & 298 deletions

File tree

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Cello CI
1+
name: Integration Tests
22

33
on:
44
push:
@@ -24,7 +24,17 @@ jobs:
2424
2525
- name: Build Hyperledger Fabric Node
2626
working-directory: src/nodes/hyperledger-fabric
27-
run: docker build -t hyperledger/fabric:2.5.14 .
27+
run: docker build -t hyperledger/fabric:2.5.15 .
28+
29+
- name: Run newman tests
30+
working-directory: tests/postman
31+
run: docker compose up --abort-on-container-exit
32+
33+
- name: Stop Hyperledger Fabric Chaincode
34+
run: docker ps -q --filter "name=dev-peer0.org1.foo.com-basic_1.0" | xargs -r docker stop
35+
36+
- name: Stop Hyperledger Fabric Nodes
37+
run: docker stop orderer0.foo.com peer0.org1.foo.com
2838

2939
- name: Stop Hyperledger Fabric Agent
3040
run: docker stop cello-hyperledger-fabric-agent
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Code Check CI
1+
name: Lint Check
22

33
on:
44
push:
@@ -12,21 +12,26 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v3
15+
1516
- name: Set up Python
1617
uses: actions/setup-python@v4
1718
with:
1819
python-version: "3.8"
20+
1921
- name: Set up Nodejs
2022
uses: actions/setup-node@v3
2123
with:
2224
node-version: "20"
25+
2326
- name: Install Python dependencies
2427
run: |
2528
python -m pip install --upgrade pip
2629
python -m pip install tox tox-gh-actions
30+
2731
- name: Install Nodejs dependencies
2832
working-directory: src/dashboard
2933
run: |
3034
yarn install --frozen-lockfile
35+
3136
- name: Check code
3237
run: make check

src/agents/hyperledger-fabric/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM python:3.13
22

3+
ENV FABRIC_VERSION=2.5.15
4+
35
# Install software
46
RUN apt-get update\
57
&& apt-get autoclean\
@@ -18,7 +20,7 @@ RUN ARCH=$(dpkg --print-architecture) && \
1820
amd64|arm64) FABRIC_ARCH="$ARCH" ;; \
1921
*) echo "Unsupported architecture: $ARCH" >&2; exit 1 ;; \
2022
esac && \
21-
curl -fsSL --retry 5 --retry-delay 3 "https://github.com/hyperledger/fabric/releases/download/v2.5.14/hyperledger-fabric-linux-${FABRIC_ARCH}-2.5.14.tar.gz" | tar xz -C ./cello/
23+
curl -fsSL --retry 5 --retry-delay 3 "https://github.com/hyperledger/fabric/releases/download/v${FABRIC_VERSION}/hyperledger-fabric-linux-${FABRIC_ARCH}-${FABRIC_VERSION}.tar.gz" | tar xz -C ./cello/
2224

2325
# Install python dependencies
2426
RUN pip3 install -r requirements.txt

src/agents/hyperledger-fabric/chaincode/serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def create(self, validated_data):
117117

118118
threading.Thread(
119119
target=install_chaincode,
120-
args=(fs.path(filename)),
120+
args=(fs.path(filename),),
121121
daemon=True).start()
122122
return self
123123

src/agents/hyperledger-fabric/chaincode/service.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
import os
44
import subprocess
55
import tarfile
6+
import docker
67
import yaml
78
from typing import List, Optional, Dict, Any
89

910
from chaincode.enums import ChaincodeStatus
10-
from hyperledger_fabric.settings import CELLO_HOME, CRYPTO_CONFIG, FABRIC_TOOL
11+
from hyperledger_fabric.settings import CELLO_HOME, CRYPTO_CONFIG, FABRIC_TOOL, FABRIC_VERSION
1112

1213
LOG = logging.getLogger(__name__)
13-
14+
docker_client = docker.DockerClient("unix:///var/run/docker.sock")
1415

1516
def get_chaincode_status(
1617
package_id: str,
@@ -280,6 +281,8 @@ def install_chaincode(file_path: str):
280281
) as f:
281282
crypto_config = yaml.safe_load(f)
282283

284+
docker_client.images.pull("hyperledger/fabric-ccenv", tag=FABRIC_VERSION.rsplit(".", 1)[0])
285+
283286
peer_organization_directory = os.path.join(
284287
CELLO_HOME,
285288
"peerOrganizations",

src/agents/hyperledger-fabric/hyperledger_fabric/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
CELLO_HOME = os.path.join(BASE_DIR, "cello")
132132
CRYPTO_CONFIG = os.path.join(CELLO_HOME, "crypto-config.yaml")
133133
FABRIC_TOOL = os.path.join(CELLO_HOME, "bin")
134-
FABRIC_VERSION = "2.5.14"
134+
FABRIC_VERSION = "2.5.15"
135135

136136
LOGGING = {
137137
"version": 1,

src/agents/hyperledger-fabric/node/service.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
from node.enums import NodeType
1313

1414
LOG = logging.getLogger(__name__)
15-
16-
1715
docker_client = docker.DockerClient("unix:///var/run/docker.sock")
1816

1917
def get_node_status(node_type: str, name: str) -> str:

src/nodes/hyperledger-fabric/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# Workdir is set to $GOPATH/src/github.com/hyperledger/fabric
2222
# Data is stored under /var/hyperledger/production
2323

24-
FROM golang:1.25.5
24+
FROM golang:1.26.2
2525
LABEL maintainer="Baohua Yang <yeasy.github.com>"
2626

2727
# Orderer, peer, ca, operation api
@@ -34,10 +34,10 @@ ENV FABRIC_ROOT=$GOPATH/src/github.com/hyperledger/fabric \
3434
FABRIC_CA_ROOT=$GOPATH/src/github.com/hyperledger/fabric-ca
3535

3636
# BASE_VERSION is used in metadata.Version as major version
37-
ENV BASE_VERSION=2.5.14
37+
ENV BASE_VERSION=2.5.15
3838

3939
# PROJECT_VERSION is required in core.yaml for fabric-baseos and fabric-ccenv
40-
ENV PROJECT_VERSION=2.5.14
40+
ENV PROJECT_VERSION=2.5.15
4141
ENV HLF_CA_VERSION=1.5.16
4242

4343
# generic environment (core.yaml) for builder and runtime: e.g., builder: $(DOCKER_NS)/fabric-ccenv:$(TWO_DIGIT_VERSION), golang, java, node

0 commit comments

Comments
 (0)