Skip to content

Commit

Permalink
[FABCN-377] Prepare for v2.1 unstable builds (WIP)
Browse files Browse the repository at this point in the history
Signed-off-by: James Taylor <jamest@uk.ibm.com>
  • Loading branch information
jt-nti authored and mbwhite committed Jan 23, 2020
1 parent 869f107 commit 9bcd0b3
Show file tree
Hide file tree
Showing 24 changed files with 142 additions and 152 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## v2.0.0
Wed 22 Jan 2020 16:03:50 GMT

* [869f107](https://github.com/hyperledger/fabric-chaincode-node/commit/869f107) [FABCI-482](https://jira.hyperledger.org/browse/FABCI-482) Update Nexus URL's to Artifactory
* [b296d0a](https://github.com/hyperledger/fabric-chaincode-node/commit/b296d0a) [FABCN-241](https://jira.hyperledger.org/browse/FABCN-241) - Remove to.be.ok (#55)
* [b345925](https://github.com/hyperledger/fabric-chaincode-node/commit/b345925) Update maintainers list
* [81eb5a9](https://github.com/hyperledger/fabric-chaincode-node/commit/81eb5a9) Update rush node.js version (#54)
* [084c595](https://github.com/hyperledger/fabric-chaincode-node/commit/084c595) [FABCN-355](https://jira.hyperledger.org/browse/FABCN-355) Added READMEs
* [6b60a98](https://github.com/hyperledger/fabric-chaincode-node/commit/6b60a98) [FABCN-353](https://jira.hyperledger.org/browse/FABCN-353) License updates (#50)

## v2.0.0-beta
Thu 12 Dec 11:46:40 GMT 2019

Expand Down
6 changes: 3 additions & 3 deletions apis/fabric-contract-api/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fabric-contract-api",
"version": "2.0.0-beta.1",
"tag": "beta",
"version": "2.1.0-unstable",
"tag": "unstable",
"description": "A node.js implementation of Hyperledger Fabric chaincode shim, to allow endorsing peers and user-provided chaincodes to communicate with each other",
"main": "index.js",
"repository": {
Expand Down Expand Up @@ -46,7 +46,7 @@
"lines": 100
},
"dependencies": {
"fabric-shim-api": "2.0.0-beta.1",
"fabric-shim-api": "2.1.0-unstable",
"class-transformer": "^0.2.2",
"fast-safe-stringify": "~2.0.7",
"get-params": "^0.1.2",
Expand Down
4 changes: 2 additions & 2 deletions apis/fabric-shim-api/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fabric-shim-api",
"version": "2.0.0-beta.1",
"tag": "beta",
"version": "2.1.0-unstable",
"tag": "unstable",
"description": "A node.js API of Hyperledger Fabric chaincode shim, to allow endorsing peers and user-provided chaincodes to communicate with each other",
"main": "index.js",
"repository": {
Expand Down
10 changes: 5 additions & 5 deletions ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ stages:
workingFile: '$(Agent.TempDirectory)/.npmrc'
customEndpoint: 'fabric-chainode-node-npm'
- script: |
find $(Pipeline.Workspace)/node-tgz/ -maxdepth 1 -type f -name 'fabric-*.tgz' -exec npm publish {} --tag beta \;
find $(Pipeline.Workspace)/node-tgz/ -maxdepth 1 -type f -name 'fabric-*.tgz' -exec npm publish {} --tag unstable \;
displayName: 'npm publish'
- job: jsdoc_publish
steps:
Expand All @@ -251,11 +251,11 @@ stages:
docker login ${DOCKER_REGISTRY_URL} --username=${DOCKER_REGISTRY_USERNAME} --password=${DOCKER_REGISTRY_PASSWORD}
echo "Logged in to docker registry"
# tag nodeenv image to PACKAGE_VERSION
docker tag hyperledger/fabric-nodeenv fabric-nodeenv:amd64-$(BuildData.PACKAGE_VERSION)-beta
docker tag hyperledger/fabric-nodeenv fabric-nodeenv:amd64-$(BuildData.PACKAGE_VERSION)-unstable
# push nodeenv to repository
docker push hyperledger/fabric-nodeenv:amd64-$(BuildData.PACKAGE_VERSION)-beta
./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"
./manifest-tool push from-args --platforms linux/amd64 --template "hyperledger/fabric-nodeenv:amd64-$(BuildData.PACKAGE_VERSION)-beta" --target "hyperledger/fabric-nodeenv:2.0"
docker push hyperledger/fabric-nodeenv:amd64-$(BuildData.PACKAGE_VERSION)-unstable
./manifest-tool push from-args --platforms linux/amd64 --template "hyperledger/fabric-nodeenv:amd64-$(BuildData.PACKAGE_VERSION)-unstable" --target "hyperledger/fabric-nodeenv:$(BuildData.PACKAGE_VERSION)-unstable"
./manifest-tool push from-args --platforms linux/amd64 --template "hyperledger/fabric-nodeenv:amd64-$(BuildData.PACKAGE_VERSION)-unstable" --target "hyperledger/fabric-nodeenv:2.0-unstable"
env:
DOCKER_REGISTRY_USERNAME: $(DockerHub-Username)
DOCKER_REGISTRY_PASSWORD: $(DockerHub-Password)
4 changes: 2 additions & 2 deletions docs/apidocs/tutorials/using-chaincodeinterface.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cd mycc
// create a new node project
npm init
// install fabric-shim at master branch
npm install 2.0.0-beta.1
npm install 2.1.0-unstable
// or using the released version
npm install fabric-shim
touch mychaincode.js
Expand Down Expand Up @@ -68,7 +68,7 @@ Finally, update the "start" script in package.json to "node mychaincode.js":
"engineStrict": true,
"license": "Apache-2.0",
"dependencies": {
"fabric-shim": "2.0.0-beta.1"
"fabric-shim": "2.1.0-unstable"
}
}
```
Expand Down
4 changes: 2 additions & 2 deletions libraries/fabric-shim-crypto/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fabric-shim-crypto",
"version": "2.0.0-beta.1",
"tag": "beta",
"version": "2.1.0-unstable",
"tag": "unstable",
"description": "A node.js implementation of encryption library for Hyperledger Fabric chaincode shim",
"main": "index.js",
"repository": {
Expand Down
8 changes: 4 additions & 4 deletions libraries/fabric-shim/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fabric-shim",
"version": "2.0.0-beta.1",
"tag": "beta",
"version": "2.1.0-unstable",
"tag": "unstable",
"description": "A node.js implementation of Hyperledger Fabric chaincode shim, to allow endorsing peers and user-provided chaincodes to communicate with each other",
"main": "index.js",
"bin": {
Expand Down Expand Up @@ -61,8 +61,8 @@
"@grpc/proto-loader": "^0.5.1",
"@types/node": "^8.9.4",
"ajv": "^6.5.5",
"fabric-contract-api": "2.0.0-beta.1",
"fabric-shim-api": "2.0.0-beta.1",
"fabric-contract-api": "2.1.0-unstable",
"fabric-shim-api": "2.1.0-unstable",
"fs-extra": "8.1.0",
"grpc": "^1.23.3",
"reflect-metadata": "^0.1.12",
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "fabric-shim-test",
"version": "2.0.0-beta.1",
"tag": "beta",
"version": "2.1.0-unstable",
"tag": "unstable",
"description": "fabric-shim, fabric-shim-crypto",
"testFabricVersion": "master",
"testFabricCAVersion": "1.4.4",
"testFabricThirdParty": "0.4.15",
"docsLatestVersion": "release-1.4",
"engines": {
Expand Down
53 changes: 53 additions & 0 deletions release_notes/v2.0.0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
v2.0.0, 22 January 2020
-----------------------

Release Notes
-------------
The main change in the v2.0.0 is the level of NodeJS runtime has moved up to the latest LTS version of v12.13.0
v2.0.0 has the fixes from v1.4.4 level.

Migration Notes
---------------
Note that a change needed to be made to the metadata schema as it was in error; it had diverged from the JSONSchema standard
so that it was not possible to validate complex objects.

If you have custom metadata defined in the contract, then for the complex objects defined in the 'components' section
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
of the property

Return types on functions where returned as an array of schema objects. this has been modified to be a single object. i.e.
the single value array is now just a single value.

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

In v1.4, the fabric-contract-api had a dependency on the fabric-shim. This has changed in this version to have a dependency
on the new fabric-shim-api module. This allows the fabric-contract-api to be used client side for annotations.

For contributors, the v2.0.0 repo is built using rush and is organized as a full mono-repo.

The @Object annotation has been deprecated in favour of the @DataType annotation

The x509 library used for parsing has changed; this should be parse the X509 certificates exactly the same way; this is a note that
differences are observed in the parsed certificates please raise an issue.

Summary of the programming model
-------------------------------

This is designed to improve developer productivity and ease of use.
For more information see https://hyperledger-fabric.readthedocs.io/en/developapps/developing_applications.html

Known Vulnerabilities
---------------------
none

Resolved Vulnerabilities
------------------------
none

Known Issues & Workarounds
--------------------------
none

Change Log
----------
https://github.com/hyperledger/fabric-chaincode-node/blob/release-2.0/CHANGELOG.md#v2.0.0
4 changes: 2 additions & 2 deletions test/chaincodes/annotations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"author": "",
"license": "APACHE-2.0",
"dependencies": {
"fabric-shim": "2.0.0-beta.1",
"fabric-contract-api": "2.0.0-beta.1",
"fabric-shim": "2.1.0-unstable",
"fabric-contract-api": "2.1.0-unstable",
"@types/node": "^10.3.6",
"ts-node": "^3.3.0",
"tslint": "^5.6.0",
Expand Down
4 changes: 2 additions & 2 deletions test/chaincodes/clientidentity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"fabric-shim": "2.0.0-beta.1",
"fabric-contract-api": "2.0.0-beta.1"
"fabric-shim": "2.1.0-unstable",
"fabric-contract-api": "2.1.0-unstable"
}
}
4 changes: 2 additions & 2 deletions test/chaincodes/crosschaincode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"fabric-shim": "2.0.0-beta.1",
"fabric-contract-api": "2.0.0-beta.1"
"fabric-shim": "2.1.0-unstable",
"fabric-contract-api": "2.1.0-unstable"
}
}
4 changes: 2 additions & 2 deletions test/chaincodes/crosschaincode2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"fabric-shim": "2.0.0-beta.1",
"fabric-contract-api": "2.0.0-beta.1"
"fabric-shim": "2.1.0-unstable",
"fabric-contract-api": "2.1.0-unstable"
}
}
4 changes: 2 additions & 2 deletions test/chaincodes/crud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"fabric-shim": "2.0.0-beta.1",
"fabric-contract-api": "2.0.0-beta.1"
"fabric-shim": "2.1.0-unstable",
"fabric-contract-api": "2.1.0-unstable"
}
}
6 changes: 3 additions & 3 deletions test/chaincodes/encryption/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"fabric-shim": "2.0.0-beta.1",
"fabric-contract-api": "2.0.0-beta.1",
"fabric-shim-crypto": "2.0.0-beta.1"
"fabric-shim": "2.1.0-unstable",
"fabric-contract-api": "2.1.0-unstable",
"fabric-shim-crypto": "2.1.0-unstable"
}
}
4 changes: 2 additions & 2 deletions test/chaincodes/events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"fabric-shim": "2.0.0-beta.1",
"fabric-contract-api": "2.0.0-beta.1"
"fabric-shim": "2.1.0-unstable",
"fabric-contract-api": "2.1.0-unstable"
}
}
4 changes: 2 additions & 2 deletions test/chaincodes/query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"fabric-shim": "2.0.0-beta.1",
"fabric-contract-api": "2.0.0-beta.1"
"fabric-shim": "2.1.0-unstable",
"fabric-contract-api": "2.1.0-unstable"
}
}
4 changes: 2 additions & 2 deletions test/chaincodes/scenario/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"fabric-shim": "2.0.0-beta.1",
"fabric-contract-api": "2.0.0-beta.1"
"fabric-shim": "2.1.0-unstable",
"fabric-contract-api": "2.1.0-unstable"
}
}
10 changes: 5 additions & 5 deletions test/fv/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fvtests",
"version": "2.0.0-beta.1",
"version": "2.1.0-unstable",
"description": "fv tests",
"testFabricVersion": "master",
"testFabricThirdParty": "0.4.15",
Expand All @@ -26,10 +26,10 @@
"del": "^3.0.0",
"delay": "4.3.0",
"eslint": "6.6.0",
"fabric-contract-api": "2.0.0-beta.1",
"fabric-shim": "2.0.0-beta.1",
"fabric-shim-api": "2.0.0-beta.1",
"fabric-shim-crypto": "2.0.0-beta.1",
"fabric-contract-api": "2.1.0-unstable",
"fabric-shim": "2.1.0-unstable",
"fabric-shim-api": "2.1.0-unstable",
"fabric-shim-crypto": "2.1.0-unstable",
"fs-extra": "8.1.0",
"git-rev-sync": "1.12.0",
"gulp": "^4.0.0",
Expand Down
25 changes: 16 additions & 9 deletions tools/getEdgeDocker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,32 @@ ARTIFACTORY_URL=hyperledger-fabric.jfrog.io
ORG_NAME="hyperledger"

VERSION=2.0.0
CA_VERSION=1.4.4
ARCH="amd64"
: ${STABLE_VERSION:=$VERSION-stable}
STABLE_TAG=$ARCH-$STABLE_VERSION
MASTER_TAG=$ARCH-master

echo "---------> STABLE_VERSION:" $STABLE_VERSION

# Specifically not pulling down javaenv nodeenv
# javaenv not needed and we've just rebuilt the nodeenv

dockerTag() {
for IMAGES in peer orderer ca ca orderer baseos ccenv tools; do
for IMAGES in peer orderer ca baseos ccenv tools; do
echo "Images: $IMAGES"
echo

if [ "${IMAGES}" = "ca" ]; then
STABLE_TAG=$ARCH-$CA_VERSION-stable
else
STABLE_TAG=$ARCH-$VERSION-stable
fi
echo "---------> STABLE_TAG:" $STABLE_TAG
echo

docker pull $ARTIFACTORY_URL/fabric-$IMAGES:$STABLE_TAG
if [[ $? != 0 ]]; then
echo "FAILED: Docker Pull Failed on $IMAGES"
exit 1
fi
if [[ $? != 0 ]]; then
echo "FAILED: Docker Pull Failed on $IMAGES"
exit 1
fi

docker tag $ARTIFACTORY_URL/fabric-$IMAGES:$STABLE_TAG $ORG_NAME/fabric-$IMAGES
docker tag $ARTIFACTORY_URL/fabric-$IMAGES:$STABLE_TAG $ORG_NAME/fabric-$IMAGES:$MASTER_TAG
echo "$ORG_NAME/fabric-$IMAGES:$MASTER_TAG"
Expand Down
12 changes: 9 additions & 3 deletions tools/scripts/changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@
#
# SPDX-License-Identifier: Apache-2.0
#

set -ev
echo "## $2\n$(date)" >> CHANGELOG.new

PREVIOUS_TAG=$1
NEW_VERSION=$2

: ${PREVIOUS_TAG:?}
: ${NEW_VERSION:?}

echo "## ${NEW_VERSION}\n$(date)" >> CHANGELOG.new
echo "" >> CHANGELOG.new
git log $1..HEAD --oneline | grep -v Merge | sed -e "s/\[\(FAB-[0-9]*\)\]/\[\1\](https:\/\/jira.hyperledger.org\/browse\/\1\)/" -e "s/ \(FAB-[0-9]*\)/ \[\1\](https:\/\/jira.hyperledger.org\/browse\/\1\)/" -e "s/\([0-9|a-z]*\)/* \[\1\](https:\/\/github.com\/hyperledger\/fabric-chaincode-node\/commit\/\1)/" >> CHANGELOG.new
git log ${PREVIOUS_TAG}..HEAD --oneline | grep -v Merge | sed -e "s/\[\{0,1\}\(FAB[^0-9]*-[0-9]*\)\]\{0,1\}/\[\1\](https:\/\/jira.hyperledger.org\/browse\/\1\)/" -e "s/\([0-9|a-z]*\)/* \[\1\](https:\/\/github.com\/hyperledger\/fabric-chaincode-node\/commit\/\1)/" >> CHANGELOG.new
echo "" >> CHANGELOG.new
cat CHANGELOG.md >> CHANGELOG.new
mv -f CHANGELOG.new CHANGELOG.md
Loading

0 comments on commit 9bcd0b3

Please sign in to comment.