Skip to content

Commit bd518a0

Browse files
committed
Prepare v2.0.0-beta.1
Signed-off-by: Matthew B White <whitemat@uk.ibm.com> Change-Id: I1e77b81ea9488047f1ba64f6ee222c054fc573dc
1 parent 8fb3172 commit bd518a0

File tree

23 files changed

+134
-57
lines changed

23 files changed

+134
-57
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ Please visit the [contributors guide](http://hyperledger-fabric.readthedocs.io/e
66

77
## Folder Structure
88

9-
This repo is structured as a monorepo using [Rush](https://rushjs.io/). Why a monorepo? There are multiple npm modules that are published from this repo, including end to end tests, and tooling. It is siginficant easier to manager within one repo - and Rush has proven to provide excellent support for management of issues such as different dependency versions.
9+
This repo is structured as a monorepo using [Rush](https://rushjs.io/). Why a monorepo? There are multiple npm modules that are published from this repo, including end to end tests, and tooling. It is significantly easier to manager within one repo - and Rush has proven to provide excellent support for management of issues such as different dependency versions.
1010

11-
The standard Rush convetions are followed as much as possible, deviation only (currently) in publishing and broad release version control. This deviation is to fit in with the existing Hyperledger Fabric release process - and some of these features in Rush are still evolving. This current Rush configuration is also not meant to be the final configuration; we are happy to enterain changes to improve the structure
11+
The standard Rush conventions are followed as much as possible, deviation only (currently) in publishing and broad release version control. This deviation is to fit in with the existing Hyperledger Fabric release process - and some of these features in Rush are still evolving. This current Rush configuration is also not meant to be the final configuration; we are happy to entertain changes to improve the structure
1212

1313
### Categories
1414

@@ -59,7 +59,7 @@ To clean up docker
5959

6060
## Mechanics of Contributing
6161

62-
The codebase is maintained in [github](https://github.com/hyperledger/fabric-chaincode-node), with a CI pileline run with [Azure Devlops](https://dev.azure.com/Hyperledger/Fabric-Chaincode-Node/_build?definitionId=33&_a=summary). Issues are handling in [Jira](https://jira.hyperledger.org/issues/?jql=project%20%3D%20FAB%20AND%20component%20%3D%20fabric-chaincode-node) (please use the component `fabric-chaincode-node` in jira as this is shared project with other Fabric components).
62+
The codebase is maintained in [github](https://github.com/hyperledger/fabric-chaincode-node), with a CI pipeline run with [Azure Devlops](https://dev.azure.com/Hyperledger/Fabric-Chaincode-Node/_build?definitionId=33&_a=summary). Issues are handling in [Jira](https://jira.hyperledger.org/issues/?jql=project%20%3D%20FAB%20AND%20component%20%3D%20fabric-chaincode-node) (please use the component `fabric-chaincode-node` in jira as this is shared project with other Fabric components).
6363

6464

6565

apis/fabric-contract-api/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "fabric-contract-api",
3-
"version": "2.0.0-snapshot",
4-
"tag": "unstable",
3+
"version": "2.0.0-beta.1",
4+
"tag": "beta",
55
"description": "A node.js implementation of Hyperledger Fabric chaincode shim, to allow endorsing peers and user-provided chaincodes to communicate with each other",
66
"main": "index.js",
77
"repository": {
@@ -46,7 +46,7 @@
4646
"lines": 100
4747
},
4848
"dependencies": {
49-
"fabric-shim-api": "2.0.0-snapshot",
49+
"fabric-shim-api": "2.0.0-beta.1",
5050
"class-transformer": "^0.2.2",
5151
"fast-safe-stringify": "~2.0.7",
5252
"get-params": "^0.1.2",

apis/fabric-shim-api/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "fabric-shim-api",
3-
"version": "2.0.0-snapshot",
4-
"tag": "unstable",
3+
"version": "2.0.0-beta.1",
4+
"tag": "beta",
55
"description": "A node.js API of Hyperledger Fabric chaincode shim, to allow endorsing peers and user-provided chaincodes to communicate with each other",
66
"main": "index.js",
77
"repository": {

ci/azure-pipelines.yml

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ stages:
5858
# output some basic information for reference
5959
- job: displayenv
6060
steps:
61-
- script: |
62-
env | sort
61+
- template: templates/build-data.yaml
6362
- job: main
6463
displayName: 'Build, lint, UT'
6564
steps:
@@ -222,15 +221,6 @@ stages:
222221
dependsOn: Build_and_Test
223222
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags'))
224223
jobs:
225-
- job: update_version
226-
steps:
227-
- script: |
228-
env | sort
229-
echo "Update the version number"
230-
VERSION=$(jq '.version' $(Build.SourcesDirectory)/package.json | sed -r "s/\"([0-9]?[0-9]\.[0-9]?[0-9]\.[0-9]?[0-9]).*/\1/")
231-
echo Version is :${VERSION}:
232-
echo "Make sure release notes are present"
233-
echo "Make sure change history is present"
234224
- job: npm_publish
235225
displayName: 'npm publish'
236226
steps:
@@ -260,3 +250,29 @@ stages:
260250
set -ev
261251
echo "checkout docs branch"
262252
echo "checking"
253+
- job: dockerhub_publish
254+
steps:
255+
- template: templates/build-data.yaml
256+
- task: DownloadPipelineArtifact@2
257+
inputs:
258+
artifact: nodeenv-docker-image
259+
path: $(Build.SourcesDirectory)/build
260+
261+
- script: |
262+
wget -qO "$PWD/manifest-tool" https://github.com/estesp/manifest-tool/releases/download/v1.0.0/manifest-tool-linux-amd64
263+
chmod +x ./manifest-tool
264+
265+
docker image load --input build/fabric-nodeenv.tar.gz
266+
docker images
267+
# Publish docker images to nexus repository
268+
docker login ${DOCKER_REGISTRY_URL} --username=${DOCKER_REGISTRY_USERNAME} --password=${DOCKER_REGISTRY_PASSWORD}
269+
echo "Logged in to docker registry"
270+
# tag nodeenv image to PACKAGE_VERSION
271+
docker tag hyperledger/fabric-nodeenv fabric-nodeenv:amd64-$(BuildData.PACKAGE_VERSION)-beta
272+
# push nodeenv to repository
273+
docker push hyperledger/fabric-nodeenv:amd64-$(BuildData.PACKAGE_VERSION)-beta
274+
./manifest-tool push from-args --platforms linux/amd64 --template "hyperledger/fabric-nodeenv:amd64-$(BuildData.PACKAGE_VERSION)-beta" --target "hyperledger/fabric-nodeenv:$(BuildData.PACKAGE_VERSION)-beta"
275+
./manifest-tool push from-args --platforms linux/amd64 --template "hyperledger/fabric-nodeenv:amd64-$(BuildData.PACKAGE_VERSION)-beta" --target "hyperledger/fabric-nodeenv:2.0"
276+
env:
277+
DOCKER_REGISTRY_USERNAME: $(DockerHub-Username)
278+
DOCKER_REGISTRY_PASSWORD: $(DockerHub-Password)

ci/scripts/publish_docker.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ docker image load --input build/fabric-nodeenv.tar.gz # gets the build i
88
docker images
99

1010
docker login nexus3.hyperledger.org:10003 --username="${NEXUS_USERNAME}" --password="${NEXUS_PASSWORD}"
11-
docker tag hyperledger/fabric-nodeenv "${NEXUS_URL}/fabric-nodeenv:amd64-latest"
12-
docker push "${NEXUS_URL}/fabric-nodeenv:amd64-latest"
11+
docker tag hyperledger/fabric-nodeenv "${NEXUS_URL}/fabric-nodeenv:amd64-2.0.0-beta"
12+
docker push "${NEXUS_URL}/fabric-nodeenv:amd64-2.0.0-beta"

ci/templates/build-data.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
steps:
2+
- script: |
3+
env | sort
4+
VERSION=$(jq '.version' $(Build.SourcesDirectory)/package.json | sed -r "s/\"([0-9]?[0-9]\.[0-9]?[0-9]\.[0-9]?[0-9]).*/\1/")
5+
echo Current version in code is :${VERSION}:
6+
echo "##vso[task.setvariable variable=PACKAGE_VERSION;isOutput=true]${VERSION}"
7+
name: BuildData
8+
displayName: 'Build data'

docs/apidocs/tutorials/using-chaincodeinterface.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ cd mycc
88
// create a new node project
99
npm init
1010
// install fabric-shim at master branch
11-
npm install fabric-shim@unstable
11+
npm install 2.0.0-beta.1
1212
// or using the released version
1313
npm install fabric-shim
1414
touch mychaincode.js
@@ -68,7 +68,7 @@ Finally, update the "start" script in package.json to "node mychaincode.js":
6868
"engineStrict": true,
6969
"license": "Apache-2.0",
7070
"dependencies": {
71-
"fabric-shim": "unstable"
71+
"fabric-shim": "2.0.0-beta.1"
7272
}
7373
}
7474
```

libraries/fabric-shim-crypto/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "fabric-shim-crypto",
3-
"version": "2.0.0-snapshot",
4-
"tag": "unstable",
3+
"version": "2.0.0-beta.1",
4+
"tag": "beta",
55
"description": "A node.js implementation of encryption library for Hyperledger Fabric chaincode shim",
66
"main": "index.js",
77
"repository": {

libraries/fabric-shim/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "fabric-shim",
3-
"version": "2.0.0-snapshot",
4-
"tag": "unstable",
3+
"version": "2.0.0-beta.1",
4+
"tag": "beta",
55
"description": "A node.js implementation of Hyperledger Fabric chaincode shim, to allow endorsing peers and user-provided chaincodes to communicate with each other",
66
"main": "index.js",
77
"bin": {
@@ -61,8 +61,8 @@
6161
"@grpc/proto-loader": "^0.5.1",
6262
"@types/node": "^8.9.4",
6363
"ajv": "^6.5.5",
64-
"fabric-contract-api": "2.0.0-snapshot",
65-
"fabric-shim-api": "2.0.0-snapshot",
64+
"fabric-contract-api": "2.0.0-beta.1",
65+
"fabric-shim-api": "2.0.0-beta.1",
6666
"fs-extra": "8.1.0",
6767
"grpc": "^1.23.3",
6868
"reflect-metadata": "^0.1.12",

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "fabric-shim-test",
3-
"version": "2.0.0-snapshot",
4-
"tag": "unstable",
3+
"version": "2.0.0-beta.1",
4+
"tag": "beta",
55
"description": "fabric-shim, fabric-shim-crypto",
66
"testFabricVersion": "master",
77
"testFabricThirdParty": "0.4.15",

release_notes/v2.0.0-beta.txt

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
v2.0.0-beta, 12 December 2019
2+
-----------------------------
3+
4+
Release Notes
5+
-------------
6+
The main change in the v2.0.0 beta is the level of NodeJS runtime has moved up to the latest LTS version of v12.13.0
7+
v2.0.0 beta has the fixes from v1.4.4 level.
8+
9+
Migration Notes
10+
---------------
11+
Note that a change needed to be made to the metadata schema as it was in error; it had diverged from the JSONSchema standard
12+
so that it was not possible to validate complex objects.
13+
14+
If you have custom metadata defined in the contract, then for the complex objects defined in the 'components' section
15+
the properties of this object where previously held as array; they now need to be held as a map with the key as the name
16+
of the property
17+
18+
Return types on functions where returned as an array of schema objects. this has been modified to be a single object. i.e.
19+
the single value array is now just a single value.
20+
21+
There is also a new nodeenv docker image that is used for hosting the chaincode rather than use the baseos image as in V1.4
22+
23+
In v1.4, the fabric-contract-api had a dependency on the fabric-shim. This has changed in this version to have a dependency
24+
on the new fabric-shim-api module. This allows the fabric-contract-api to be used client side for annotations.
25+
26+
For contributors, the v2.0.0 repo is built using rush and is organized as a full mono-repo.
27+
28+
The @Object annotation has been deprecated in favour of the @DataType annotation
29+
30+
The x509 library used for parsing has changed; this should be parse the X509 certificates exactly the same way; this is a note that
31+
differences are observed in the parsed certificates please raise an issue.
32+
33+
Summary of the programming model
34+
-------------------------------
35+
36+
This is designed to improve developer productivity and ease of use.
37+
For more information see https://hyperledger-fabric.readthedocs.io/en/developapps/developing_applications.html
38+
39+
Known Vulnerabilities
40+
---------------------
41+
none
42+
43+
Resolved Vulnerabilities
44+
------------------------
45+
none
46+
47+
Known Issues & Workarounds
48+
--------------------------
49+
none
50+
51+
Change Log
52+
----------
53+
https://github.com/hyperledger/fabric-chaincode-node/blob/release-1.4/CHANGELOG.md#v141

test/chaincodes/annotations/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"author": "",
1919
"license": "APACHE-2.0",
2020
"dependencies": {
21-
"fabric-shim": "unstable",
22-
"fabric-contract-api": "unstable",
21+
"fabric-shim": "2.0.0-beta.1",
22+
"fabric-contract-api": "2.0.0-beta.1",
2323
"@types/node": "^10.3.6",
2424
"ts-node": "^3.3.0",
2525
"tslint": "^5.6.0",

test/chaincodes/clientidentity/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"author": "",
1616
"license": "ISC",
1717
"dependencies": {
18-
"fabric-shim": "unstable",
19-
"fabric-contract-api": "unstable"
18+
"fabric-shim": "2.0.0-beta.1",
19+
"fabric-contract-api": "2.0.0-beta.1"
2020
}
2121
}

test/chaincodes/crosschaincode/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"author": "",
1616
"license": "ISC",
1717
"dependencies": {
18-
"fabric-shim": "unstable",
19-
"fabric-contract-api": "unstable"
18+
"fabric-shim": "2.0.0-beta.1",
19+
"fabric-contract-api": "2.0.0-beta.1"
2020
}
2121
}

test/chaincodes/crosschaincode2/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"author": "",
1616
"license": "ISC",
1717
"dependencies": {
18-
"fabric-shim": "unstable",
19-
"fabric-contract-api": "unstable"
18+
"fabric-shim": "2.0.0-beta.1",
19+
"fabric-contract-api": "2.0.0-beta.1"
2020
}
2121
}

test/chaincodes/crud/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"author": "",
1616
"license": "Apache-2.0",
1717
"dependencies": {
18-
"fabric-shim": "unstable",
19-
"fabric-contract-api": "unstable"
18+
"fabric-shim": "2.0.0-beta.1",
19+
"fabric-contract-api": "2.0.0-beta.1"
2020
}
2121
}

test/chaincodes/encryption/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"author": "",
1616
"license": "ISC",
1717
"dependencies": {
18-
"fabric-shim": "unstable",
19-
"fabric-contract-api": "unstable",
20-
"fabric-shim-crypto": "unstable"
18+
"fabric-shim": "2.0.0-beta.1",
19+
"fabric-contract-api": "2.0.0-beta.1",
20+
"fabric-shim-crypto": "2.0.0-beta.1"
2121
}
2222
}

test/chaincodes/events/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"author": "",
1616
"license": "Apache-2.0",
1717
"dependencies": {
18-
"fabric-shim": "unstable",
19-
"fabric-contract-api": "unstable"
18+
"fabric-shim": "2.0.0-beta.1",
19+
"fabric-contract-api": "2.0.0-beta.1"
2020
}
2121
}

test/chaincodes/query/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"author": "",
1616
"license": "Apache-2.0",
1717
"dependencies": {
18-
"fabric-shim": "unstable",
19-
"fabric-contract-api": "unstable"
18+
"fabric-shim": "2.0.0-beta.1",
19+
"fabric-contract-api": "2.0.0-beta.1"
2020
}
2121
}

test/chaincodes/scenario/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"author": "",
1616
"license": "Apache-2.0",
1717
"dependencies": {
18-
"fabric-shim": "unstable",
19-
"fabric-contract-api": "unstable"
18+
"fabric-shim": "2.0.0-beta.1",
19+
"fabric-contract-api": "2.0.0-beta.1"
2020
}
2121
}

test/fv/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fvtests",
3-
"version": "2.0.0-snapshot",
3+
"version": "2.0.0-beta.1",
44
"description": "fv tests",
55
"testFabricVersion": "master",
66
"testFabricThirdParty": "0.4.15",
@@ -26,10 +26,10 @@
2626
"del": "^3.0.0",
2727
"delay": "4.3.0",
2828
"eslint": "6.6.0",
29-
"fabric-contract-api": "2.0.0-snapshot",
30-
"fabric-shim": "2.0.0-snapshot",
31-
"fabric-shim-api": "2.0.0-snapshot",
32-
"fabric-shim-crypto": "2.0.0-snapshot",
29+
"fabric-contract-api": "2.0.0-beta.1",
30+
"fabric-shim": "2.0.0-beta.1",
31+
"fabric-shim-api": "2.0.0-beta.1",
32+
"fabric-shim-crypto": "2.0.0-beta.1",
3333
"fs-extra": "8.1.0",
3434
"git-rev-sync": "1.12.0",
3535
"gulp": "^4.0.0",

tools/scripts/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ elif [[ ${NEW_SUFFIX} == 'snapshot' ]]; then
4646
echo new suffix is ${NEW_SUFFIX}
4747
CURRENT_VERSION=$(jq '.version' ${DIR}/package.json | sed -r "s/\"([0-9]?[0-9]\.[0-9]?[0-9]\.[0-9]?[0-9])(.)*/\1/")
4848
NEW_VERSION=$( ${DIR}/node_modules/.bin/semver -i ${CURRENT_VERSION} )-snapshot
49-
NEW_TAG="unstable-1.4"
49+
NEW_TAG="2.0.0-beta.1-1.4"
5050
else # for beta, rc etc releases where the version doesn't change
5151
echo new suffix is ${NEW_SUFFIX}
5252
NEW_VERSION=$(jq '.version' ${DIR}/package.json | sed -r "s/\"([0-9]?[0-9]\.[0-9]?[0-9]\.[0-9]?[0-9])(.)*/\1-${NEW_SUFFIX}/")

tools/toolchain/network/docker-compose/docker-compose-base.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ services:
9292
# # bridge network as the peers
9393
# # https://docs.docker.com/compose/networking/
9494
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=node_default
95-
- CORE_CHAINCODE_NODE_RUNTIME=hyperledger/fabric-nodeenv:2.0.0-snapshot
95+
- CORE_CHAINCODE_NODE_RUNTIME=hyperledger/fabric-nodeenv:2.0.0-beta.1
9696
# Allow more time for chaincode container to build on install.
9797
- CORE_CHAINCODE_EXECUTETIMEOUT=300s
9898
working_dir: /opt/gopath/src/github.com/hyperledger/fabric

0 commit comments

Comments
 (0)