Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release 1.2.0 #405

Merged
merged 1 commit into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/sample.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0-unstable/schema.json",
"$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json",
"global": {
"fabricVersion": "2.3.2",
"tls": false,
Expand Down
43 changes: 1 addition & 42 deletions docs/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"properties": {
"$schema": {
"const": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0-unstable/schema.json"
"const": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json"
},
"global": {
"$id": "#/properties/global",
Expand All @@ -28,47 +28,6 @@
"$id": "#/properties/global/properties/fabricVersion",
"title": "Hyperledger Fabric version",
"type": "string",
"enum": [
"1.3.0",
"1.4.0",
"1.4.1",
"1.4.2",
"1.4.3",
"1.4.4",
"1.4.5",
"1.4.6",
"1.4.7",
"1.4.8",
"1.4.9",
"1.4.10",
"1.4.11",
"1.4.12",
"2.0.1",
"2.1.0",
"2.1.1",
"2.2.0",
"2.2.1",
"2.2.2",
"2.2.3",
"2.2.4",
"2.2.5",
"2.2.6",
"2.2.7",
"2.2.8",
"2.2.9",
"2.3.0",
"2.3.1",
"2.3.2",
"2.3.3",
"2.4.0",
"2.4.1",
"2.4.2",
"2.4.3",
"2.4.4",
"2.4.5",
"2.4.6",
"2.4.7"
],
"default": "2.4.2"
},
"tls": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2081,7 +2081,7 @@ fi
`;

exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = `
"FABLO_VERSION=1.2.0-unstable
"FABLO_VERSION=1.2.0
FABLO_BUILD=<date with git hash>
FABLO_REST_VERSION=0.1.0
HYPERLEDGER_EXPLORER_VERSION=1.1.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1492,7 +1492,7 @@ fi
`;

exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = `
"FABLO_VERSION=1.2.0-unstable
"FABLO_VERSION=1.2.0
FABLO_BUILD=<date with git hash>
FABLO_REST_VERSION=0.1.0
HYPERLEDGER_EXPLORER_VERSION=1.1.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2107,7 +2107,7 @@ fi
`;

exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = `
"FABLO_VERSION=1.2.0-unstable
"FABLO_VERSION=1.2.0
FABLO_BUILD=<date with git hash>
FABLO_REST_VERSION=0.1.0
HYPERLEDGER_EXPLORER_VERSION=1.1.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2088,7 +2088,7 @@ fi
`;
exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = `
"FABLO_VERSION=1.2.0-unstable
"FABLO_VERSION=1.2.0
FABLO_BUILD=<date with git hash>
FABLO_REST_VERSION=0.1.0
HYPERLEDGER_EXPLORER_VERSION=1.1.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2278,7 +2278,7 @@ fi
`;

exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = `
"FABLO_VERSION=1.2.0-unstable
"FABLO_VERSION=1.2.0
FABLO_BUILD=<date with git hash>
FABLO_REST_VERSION=0.1.0
HYPERLEDGER_EXPLORER_VERSION=1.1.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-k8s.json should create proper
REPOSITORY=\\"https://kfsoftware.github.io/hlf-helm-charts\\"
STORAGE_CLASS=$(kubectl describe sc | grep Name | tr -s ' ' | cut -d ':' -f 2 | cut -d ' ' -f 2)
FABLO_VERSION=1.2.0-unstable
FABLO_VERSION=1.2.0
FABLO_BUILD=<date with git hash>
FABLO_CONFIG=<absolute path>
ORDERER_IMAGE=hyperledger/fabric-orderer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@ fi
`;

exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json 1`] = `
"FABLO_VERSION=1.2.0-unstable
"FABLO_VERSION=1.2.0
FABLO_BUILD=<date with git hash>
FABLO_REST_VERSION=0.1.0
HYPERLEDGER_EXPLORER_VERSION=1.1.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,7 @@ fi
`;

exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf2-1org-1chaincode.json 1`] = `
"FABLO_VERSION=1.2.0-unstable
"FABLO_VERSION=1.2.0
FABLO_BUILD=<date with git hash>
FABLO_REST_VERSION=0.1.0
HYPERLEDGER_EXPLORER_VERSION=1.1.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3016,7 +3016,7 @@ fi
`;

exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] = `
"FABLO_VERSION=1.2.0-unstable
"FABLO_VERSION=1.2.0
FABLO_BUILD=<date with git hash>
FABLO_REST_VERSION=0.1.0
HYPERLEDGER_EXPLORER_VERSION=1.1.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3311,7 +3311,7 @@ fi
`;

exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = `
"FABLO_VERSION=1.2.0-unstable
"FABLO_VERSION=1.2.0
FABLO_BUILD=<date with git hash>
FABLO_REST_VERSION=0.1.0
HYPERLEDGER_EXPLORER_VERSION=1.1.8
Expand Down
6 changes: 3 additions & 3 deletions e2e/__snapshots__/fabloCommands.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2907,7 +2907,7 @@ Validation warnings count: 0

exports[`init should init simple fablo config 1`] = `
"{
\\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.0-unstable/schema.json\\",
\\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json\\",
\\"global\\": {
\\"fabricVersion\\": \\"2.4.7\\",
\\"tls\\": false,
Expand Down Expand Up @@ -2961,7 +2961,7 @@ exports[`init should init simple fablo config 1`] = `

exports[`init should init simple fablo config with node chaincode 1`] = `
"{
\\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.0-unstable/schema.json\\",
\\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json\\",
\\"global\\": {
\\"fabricVersion\\": \\"2.4.7\\",
\\"tls\\": false,
Expand Down Expand Up @@ -3023,7 +3023,7 @@ exports[`init should init simple fablo config with node chaincode 1`] = `

exports[`init should init simple fablo config with node chaincode and rest api 1`] = `
"{
\\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.0-unstable/schema.json\\",
\\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json\\",
\\"global\\": {
\\"fabricVersion\\": \\"2.4.7\\",
\\"tls\\": false,
Expand Down
43 changes: 1 addition & 42 deletions e2e/__snapshots__/schema.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Object {
"default": Object {},
"properties": Object {
"$schema": Object {
"const": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0-unstable/schema.json",
"const": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json",
},
"chaincodes": Object {
"$id": "#/properties/chaincodes",
Expand Down Expand Up @@ -252,47 +252,6 @@ Object {
"fabricVersion": Object {
"$id": "#/properties/global/properties/fabricVersion",
"default": "2.4.2",
"enum": Array [
"1.3.0",
"1.4.0",
"1.4.1",
"1.4.2",
"1.4.3",
"1.4.4",
"1.4.5",
"1.4.6",
"1.4.7",
"1.4.8",
"1.4.9",
"1.4.10",
"1.4.11",
"1.4.12",
"2.0.1",
"2.1.0",
"2.1.1",
"2.2.0",
"2.2.1",
"2.2.2",
"2.2.3",
"2.2.4",
"2.2.5",
"2.2.6",
"2.2.7",
"2.2.8",
"2.2.9",
"2.3.0",
"2.3.1",
"2.3.2",
"2.3.3",
"2.4.0",
"2.4.1",
"2.4.2",
"2.4.3",
"2.4.4",
"2.4.5",
"2.4.6",
"2.4.7",
],
"title": "Hyperledger Fabric version",
"type": "string",
},
Expand Down
1 change: 0 additions & 1 deletion e2e/fabloCommands.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ describe("version", () => {
build: expect.stringMatching(/.*/),
supported: expect.objectContaining({
fabloVersions: expect.stringMatching(/.*/),
hyperledgerFabricVersions: expect.anything(),
}),
}),
);
Expand Down
4 changes: 2 additions & 2 deletions e2e/schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ describe("schema", () => {

expect(withFabricVersion("1.4.3")).toMatchSchema(schema);
expect(withFabricVersion("1.4.4")).toMatchSchema(schema);
expect(withFabricVersion("1.3.1")).not.toMatchSchema(schema);
expect(withFabricVersion("2.0.0")).not.toMatchSchema(schema);
expect(withFabricVersion("1.3.1")).toMatchSchema(schema);
expect(withFabricVersion("2.0.0")).toMatchSchema(schema);
});

it("should validate first orderer org domain prefix", () => {
Expand Down
4 changes: 2 additions & 2 deletions fablo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

FABLO_VERSION="1.2.0-unstable"
FABLO_VERSION="1.2.0"
FABLO_IMAGE_NAME="softwaremill/fablo"
FABLO_IMAGE="$FABLO_IMAGE_NAME:$FABLO_VERSION"

Expand Down Expand Up @@ -188,7 +188,7 @@ networkPrune() {
if [ -f "$FABLO_TARGET/fabric-k8s.sh" ]; then
"$FABLO_TARGET/fabric-k8s.sh" down
fi

echo "Removing $FABLO_TARGET"
rm -rf "$FABLO_TARGET"
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generator-fablo",
"version": "1.2.0-unstable",
"version": "1.2.0",
"description": "Fablo is a simple tool to generate the Hyperledger Fabric blockchain network and run it on Docker. It supports RAFT and solo consensus protocols, multiple organizations and channels, chaincode installation and upgrade.",
"author": "Piotr Hejwowski <[email protected]>, Jakub Dzikowski <[email protected]>",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0-unstable/schema.json",
"$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json",
"global": {
"fabricVersion": "1.3.0",
"tls": false
Expand Down
2 changes: 1 addition & 1 deletion samples/fablo-config-hlf1.4-1org-1chaincode-raft.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0-unstable/schema.json",
"$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json",
"global": {
"fabricVersion": "1.4.6",
"tls": true,
Expand Down
2 changes: 1 addition & 1 deletion samples/fablo-config-hlf1.4-2orgs-1chaincode.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0-unstable/schema.json",
"$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json",
"global": {
"fabricVersion": "1.4.6",
"tls": false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.2.0-unstable/schema.json
"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json
global:
fabricVersion: 1.4.11
tls: false
Expand Down
2 changes: 1 addition & 1 deletion samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0-unstable/schema.json",
"$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json",
"global": {
"fabricVersion": "1.4.6",
"tls": true
Expand Down
2 changes: 1 addition & 1 deletion samples/fablo-config-hlf2-1org-1chaincode-k8s.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0-unstable/schema.json",
"$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json",
"global": {
"fabricVersion": "2.4.7",
"tls": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0-unstable/schema.json",
"$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json",
"global": {
"fabricVersion": "2.3.3",
"tls": true,
Expand Down
2 changes: 1 addition & 1 deletion samples/fablo-config-hlf2-1org-1chaincode.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0-unstable/schema.json",
"$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json",
"global": {
"fabricVersion": "2.4.7",
"tls": false
Expand Down
2 changes: 1 addition & 1 deletion samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.2.0-unstable/schema.json
"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json
global:
fabricVersion: 2.4.3
tls: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0-unstable/schema.json",
"$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json",
"global": {
"fabricVersion": "2.3.2",
"tls": true,
Expand Down
5 changes: 1 addition & 4 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@ const getVersionFromSchemaUrl = (url?: string): string => {

const isFabloVersionSupported = (versionName: string): boolean => versionName.startsWith(supportedVersionPrefix);

const supportedFabricVersions = schemaJson.properties.global.properties.fabricVersion.enum as string[];

const versionsSupportingRaft = supportedFabricVersions.filter((v) => version(v).isGreaterOrEqual("1.4.3"));
const versionsSupportingRaft = (v: string): boolean => version(v).isGreaterOrEqual("1.4.3");

export {
schema,
fabloVersion,
supportedFabricVersions,
versionsSupportingRaft,
getVersionFromSchemaUrl,
isFabloVersionSupported,
Expand Down
Loading
Loading