Skip to content

Commit 82f5225

Browse files
committed
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 <[email protected]>
1 parent 5925f57 commit 82f5225

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Makefile

+7-5
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ membersrvc-image: build/image/membersrvc/.dummy
9393
unit-test: peer-image gotools
9494
@./scripts/goUnitTests.sh $(DOCKER_TAG) "$(GO_LDFLAGS)"
9595

96+
node-sdk: sdk/node
97+
98+
node-sdk-unit-tests: peer membersrvc
99+
cd sdk/node && $(MAKE) unit-tests
100+
101+
unit-tests: unit-test node-sdk-unit-tests
102+
96103
.PHONY: images
97104
images: $(patsubst %,build/image/%/.dummy, $(IMAGES))
98105

@@ -251,11 +258,6 @@ images-clean: $(patsubst %,%-image-clean, $(SUBIMAGES))
251258

252259
images-scrub: $(patsubst %,%-image-clean, $(IMAGES))
253260

254-
node-sdk: sdk/node
255-
256-
node-sdk-unit-tests: peer membersrvc
257-
cd sdk/node && $(MAKE) unit-tests
258-
259261
.PHONY: $(SUBDIRS:=-clean)
260262
$(SUBDIRS:=-clean):
261263
cd $(patsubst %-clean,%,$@) && $(MAKE) clean

sdk/node/Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ hfc:
2727
mkdir -p ./lib/protos
2828
cp ../../protos/*.proto ./lib/protos
2929
cp ../../membersrvc/protos/*.proto ./lib/protos
30-
npm install && sudo npm install -g typescript && sudo npm install typings --global && typings install
30+
npm ls -g | grep 'typings' || sudo npm install -g typings
31+
npm ls -g | grep 'typescript' || sudo npm install -g typescript
32+
npm install && typings install
3133
tsc
3234
./makedoc.sh
3335

0 commit comments

Comments
 (0)