From 82f5225e909a811614961266879b6f09c69a7765 Mon Sep 17 00:00:00 2001 From: rameshthoomu Date: Wed, 24 Aug 2016 14:38:53 -0400 Subject: [PATCH] FAB-263 Enable node sdk tests in Jenkins CI process Added logic to run node sdk tests in jenkins. Jenkins doesn't support sudo so, checking whether required softwares installed in machine, if installed skipping the installation step. Change-Id: I07d4e68c95b5c8801fb11b156c649ad5d561873b Signed-off-by: rameshthoomu --- Makefile | 12 +++++++----- sdk/node/Makefile | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 689f2551..623000c0 100644 --- a/Makefile +++ b/Makefile @@ -93,6 +93,13 @@ membersrvc-image: build/image/membersrvc/.dummy unit-test: peer-image gotools @./scripts/goUnitTests.sh $(DOCKER_TAG) "$(GO_LDFLAGS)" +node-sdk: sdk/node + +node-sdk-unit-tests: peer membersrvc + cd sdk/node && $(MAKE) unit-tests + +unit-tests: unit-test node-sdk-unit-tests + .PHONY: images images: $(patsubst %,build/image/%/.dummy, $(IMAGES)) @@ -251,11 +258,6 @@ images-clean: $(patsubst %,%-image-clean, $(SUBIMAGES)) images-scrub: $(patsubst %,%-image-clean, $(IMAGES)) -node-sdk: sdk/node - -node-sdk-unit-tests: peer membersrvc - cd sdk/node && $(MAKE) unit-tests - .PHONY: $(SUBDIRS:=-clean) $(SUBDIRS:=-clean): cd $(patsubst %-clean,%,$@) && $(MAKE) clean diff --git a/sdk/node/Makefile b/sdk/node/Makefile index b644e069..fbe86f4e 100644 --- a/sdk/node/Makefile +++ b/sdk/node/Makefile @@ -27,7 +27,9 @@ hfc: mkdir -p ./lib/protos cp ../../protos/*.proto ./lib/protos cp ../../membersrvc/protos/*.proto ./lib/protos - npm install && sudo npm install -g typescript && sudo npm install typings --global && typings install + npm ls -g | grep 'typings' || sudo npm install -g typings + npm ls -g | grep 'typescript' || sudo npm install -g typescript + npm install && typings install tsc ./makedoc.sh