Skip to content

Commit

Permalink
FABN-1067 NodeSDK prepare for 1.4.0
Browse files Browse the repository at this point in the history
Prepare the branch release-1.4 for the release 1.4.0.

Change-Id: I2b67085fd22e3231adbd38aee0b515ccf65c5aa3
Signed-off-by: Bret Harrison <beharrison@nc.rr.com>
  • Loading branch information
harrisob committed Dec 13, 2018
1 parent 01a3fdf commit 5f4733b
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 49 deletions.
20 changes: 0 additions & 20 deletions Jenkinsfile.x
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ node ('hyp-x') { // trigger build on x86_64 node
try {
def ROOTDIR = pwd() // workspace dir (/w/workspace/<job_name>)
def nodeHome = tool 'nodejs-8.11.3'
env.VERSION = sh(returnStdout: true, script: 'curl -O https://raw.githubusercontent.com/hyperledger/fabric/master/Makefile && cat Makefile | grep "BASE_VERSION =" | cut -d "=" -f2').trim()
env.VERSION = "$VERSION" // BASE_VERSION from fabric Makefile
env.ARCH = "amd64"
env.IMAGE_TAG = "${ARCH}-${VERSION}-stable" // fabric latest stable version from nexus
env.PROJECT_VERSION = "${VERSION}-stable"
env.PROJECT_DIR = "gopath/src/github.com/hyperledger"
env.GOPATH = "$WORKSPACE/gopath"
env.PATH = "$GOPATH/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:${nodeHome}/bin:$PATH"
Expand Down Expand Up @@ -68,22 +64,6 @@ node ('hyp-x') { // trigger build on x86_64 node
}
}

// Pull fabric,fabric-ca and Javaenv
stage("Pull Docker Images") {
wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'xterm']) {
try {
dir("${ROOTDIR}/$PROJECT_DIR/fabric-sdk-node/scripts/Jenkins_Scripts") {
sh './CI_Script.sh --pull_Docker_Images'
}
}
catch (err) {
failure_stage = "Pull docker images"
currentBuild.result = 'FAILURE'
throw err
}
}
}

// Run gulp tests (headless and integration tests)
stage("Headless & Integration Tests") {
wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'xterm']) {
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile.z
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ node('hyp-z') {
def ROOTDIR = pwd() // workspace dir (/w/workspace/<job_name>
env.NODE_VER = "8.11.3"
// Fetch the BASE_VERSION from fabric master branch to pull images from nexus
env.VERSION = sh(returnStdout: true, script: 'curl -O https://raw.githubusercontent.com/hyperledger/fabric/master/Makefile && cat Makefile | grep "BASE_VERSION =" | cut -d "=" -f2').trim()
env.VERSION = sh(returnStdout: true, script: 'curl -O https://raw.githubusercontent.com/hyperledger/fabric/release-1.4/Makefile && cat Makefile | grep "BASE_VERSION =" | cut -d "=" -f2').trim()
env.VERSION = "$VERSION" // BASE_VERSION from fabric Makefile
env.ARCH = "s390x" // `uname -m`
env.IMAGE_TAG = "${ARCH}-${VERSION}-stable" // fabric latest stable version from nexus3
Expand Down
4 changes: 2 additions & 2 deletions fabric-ca-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"hyperledger",
"blockchain"
],
"version": "1.4.0-rc2",
"tag": "rc2",
"version": "1.4.0-rc3-snapshot",
"tag": "unstable-1.4",
"main": "index.js",
"scripts": {
"test": "nyc mocha --exclude 'test/data/**/*.js' --recursive -t 10000"
Expand Down
1 change: 1 addition & 0 deletions fabric-client/lib/Remote.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ class Remote {
if (err.message) {
err.message = err.message + ' URL:' + self.getUrl();
}
err.connectFailed = true;
logger.error(err);

return reject(err);
Expand Down
4 changes: 2 additions & 2 deletions fabric-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"hyperledger",
"blockchain"
],
"version": "1.4.0-rc2",
"tag": "rc2",
"version": "1.4.0-rc3-snapshot",
"tag": "unstable-1.4",
"main": "index.js",
"scripts": {
"test": "nyc mocha --exclude 'test/data/**/*.js' --recursive -t 10000"
Expand Down
4 changes: 2 additions & 2 deletions fabric-common/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fabric-common",
"version": "1.4.0-rc2",
"tag": "rc2",
"version": "1.4.0-rc3-snapshot",
"tag": "unstable-1.4",
"description" : "This package encapsulates the common code used by the `fabric-ca-client`, `fabric-client` packages.",
"keywords" :[
"blockchain",
Expand Down
4 changes: 2 additions & 2 deletions fabric-network/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"hyperledger",
"blockchain"
],
"version": "1.4.0-rc2",
"tag": "rc2",
"version": "1.4.0-rc3-snapshot",
"tag": "unstable-1.4",
"main": "index.js",
"repository": {
"type": "gerrit",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fabric-sdk-node",
"version": "1.4.0-rc2",
"testFabricVersion": "master",
"version": "1.4.0-rc3-snapshot",
"testFabricVersion": "1.4.0-rc1",
"testFabricThirdParty": "0.4.14",
"docsLatestVersion": "master",
"main": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion scripts/Jenkins_Scripts/Publish_API_Docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ git commit -m "SDK commit - $SDK_COMMIT"
# Credentials are stored as Global Variables in Jenkins
git config remote.gh-pages.url https://$NODE_SDK_USERNAME:$NODE_SDK_PASSWORD@github.com/$NODE_SDK_USERNAME/$TARGET_REPO
# Push API docs to target repository
git push gh-pages master
git push gh-pages release-1.4
27 changes: 12 additions & 15 deletions scripts/Jenkins_Scripts/Publish_NPM_Modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,28 @@
npmPublish() {

if [[ "$CURRENT_TAG" = *"skip"* ]]; then
echo "----> Don't publish $1 npm modules on skip tag"
echo -e "\033[34m----> Don't publish $1 npm modules on skip tag \033[0m"
elif [[ "$CURRENT_TAG" = *"unstable"* ]]; then
echo
UNSTABLE_VER=$(npm dist-tags ls "$1" | awk "/$CURRENT_TAG"":"/'{
ver=$NF
sub(/.*\./,"",rel)
sub(/\.[[:digit:]]+$/,"",ver)
print ver}')
echo "======> UNSTABLE VERSION:" $UNSTABLE_VER

UNSTABLE_INCREMENT=$(npm dist-tags ls "$1" | awk "/$CURRENT_TAG"":"/'{
ver=$NF
rel=$NF
sub(/.*\./,"",rel)
sub(/\.[[:digit:]]+$/,"",ver)
print ver"."rel+1}')
echo "======> Incremented UNSTABLE VERSION:" $UNSTABLE_INCREMENT

# Get last digit of the unstable version of $CURRENT_TAG
UNSTABLE_INCREMENT=$(echo $UNSTABLE_INCREMENT| rev | cut -d '.' -f 1 | rev)
echo "======> UNSTABLE_INCREMENT:" $UNSTABLE_INCREMENT
if [[ $UNSTABLE_VER = "" ]]; then
echo -e "\033[34m ----> unstable ver is blank \033[0m"
UNSTABLE_INCREMENT=1
else
# Get last digit of the unstable version built above
UNSTABLE_INCREMENT=$(echo $UNSTABLE_VER| rev | cut -d '.' -f 1 | rev)
fi

echo -e "\033[32m======> UNSTABLE_INCREMENT:" $UNSTABLE_INCREMENT "\033[0m"

# Append last digit with the package.json version
export UNSTABLE_INCREMENT_VERSION=$RELEASE_VERSION.$UNSTABLE_INCREMENT
echo "======> UNSTABLE_INCREMENT_VERSION:" $UNSTABLE_INCREMENT_VERSION
echo -e "\033[32m======> UNSTABLE_INCREMENT_VERSION:" $UNSTABLE_INCREMENT_VERSION "\033[0"

if [ "$1" = "fabric-network" ]; then
sed -i 's/\(.*\"fabric-client\"\: \"\)\(.*\)/\1'$CURRENT_TAG\"\,'/' package.json
Expand Down Expand Up @@ -84,7 +81,7 @@ versions() {
# START HERE
############

echo "----------> START PUBLISHING FROM HERE"
echo -e "\033[34m----------> START PUBLISHING FROM HERE" "\033[0m"
cd $WORKSPACE/gopath/src/github.com/hyperledger/fabric-sdk-node
# Set NPM_TOKEN from CI configuration
npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/src/java_cc/example_cc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repositories {
}

dependencies {
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '2.+'
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.+'
}

shadowJar {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/src/java_cc/example_cc1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repositories {
}

dependencies {
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '2.+'
compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.+'
}

shadowJar {
Expand Down

0 comments on commit 5f4733b

Please sign in to comment.