This repository has been archived by the owner on Sep 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop testing with Node <v10; upgrade tchannel->4.x (#463)
* Stop testing with Node <v10, add latest versions Signed-off-by: Yuri Shkuro <[email protected]> * update Signed-off-by: Yuri Shkuro <[email protected]> * Upgrade tchannel to 4.x, use node-alpine for crossdock Signed-off-by: Yuri Shkuro <[email protected]> * cleanup Signed-off-by: Yuri Shkuro <[email protected]> * cleanup Signed-off-by: Yuri Shkuro <[email protected]> * cleanup Signed-off-by: Yuri Shkuro <[email protected]>
- Loading branch information
1 parent
4c739a2
commit 6a6e3ea
Showing
9 changed files
with
440 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
lts/dubnium | ||
lts/fermium |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
-include crossdock/rules.mk | ||
|
||
LTS_NODE_VER=14 | ||
NODE_VER=$(shell node -v) | ||
ifeq ($(patsubst v10.%,matched,$(NODE_VER)), matched) | ||
ifeq ($(patsubst v$(LTS_NODE_VER).%,matched,$(NODE_VER)), matched) | ||
NODE_LTS=true | ||
else | ||
NODE_LTS=false | ||
endif | ||
ifeq ($(patsubst v0.10%,matched,$(NODE_VER)), matched) | ||
NODE_0_10=true | ||
else | ||
NODE_0_10=false | ||
endif | ||
|
||
.PHONY: publish | ||
publish: build-node | ||
|
@@ -20,37 +16,21 @@ publish: build-node | |
# Update Changelog.md to relfect the newest version changes. | ||
|
||
.PHONY: test | ||
test: build-node | ||
make test-without-build | ||
test: build-node test-without-build | ||
|
||
.PHONY: test-without-build | ||
test-without-build: install-test-deps | ||
test-without-build: | ||
npm run flow | ||
ifeq ($(NODE_LTS),true) | ||
npm run test-all | ||
endif | ||
npm run test-dist | ||
npm run check-license | ||
|
||
.PHONY: test-without-install | ||
test-without-install: build-without-install | ||
npm run flow | ||
ifeq ($(NODE_LTS),true) | ||
npm run test-all | ||
endif | ||
npm run test-dist | ||
npm run check-license | ||
|
||
.PHONY: install-test-deps | ||
install-test-deps: | ||
ifeq ($(NODE_0_10), false) | ||
npm install --no-save [email protected] | ||
endif | ||
|
||
.PHONY: check-node-lts | ||
check-node-lts: | ||
@$(NODE_LTS) || echo Build requires Node 10.x | ||
@$(NODE_LTS) && echo Building using Node 10.x | ||
@$(NODE_LTS) || echo Build requires Node v$(LTS_NODE_VER) | ||
@$(NODE_LTS) && echo Building using Node v$(LTS_NODE_VER) | ||
|
||
.PHONY: build-node | ||
build-node: check-node-lts node-modules build-without-install | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,17 @@ | ||
# 2020-07-16: the source image used to be woorank/docker-node-babel. | ||
# However, it is no longer available from Docker Hub. | ||
# It was republished from a local cache as jaegertracing/xdock-node:docker-node-babel. | ||
# woorank/docker-node-babel latest 1fef8ea9e76f 4 years ago 778MB | ||
# jaegertracing/xdock-node docker-node-babel 1fef8ea9e76f 4 years ago 778MB | ||
FROM node:14-alpine | ||
|
||
FROM jaegertracing/xdock-node:docker-node-babel | ||
# tchannel uses node-gyp to compile native libs, which requires python. | ||
RUN apk update && apk add python g++ make bash && rm -rf /var/cache/apk/* | ||
|
||
EXPOSE 8080-8082 | ||
|
||
ADD node_modules/ /node_modules | ||
ADD package.json / | ||
ADD package-lock.json / | ||
ADD src/ /src | ||
ADD src/jaeger-idl/thrift/crossdock/tracetest.thrift /crossdock/tracetest.thrift | ||
ADD crossdock/src /crossdock/src | ||
ADD crossdock/src/ /crossdock/src | ||
ADD .babelrc / | ||
|
||
# We re-install tchannel because it is the only depenency that requires native code compilation. | ||
# Doing a full npm install inside the container would make this build really slow. | ||
# We pin tchannel to v3, because v4 removed support for Node-v0.10. | ||
RUN npm install [email protected] | ||
RUN npm ls | ||
RUN npm install | ||
|
||
CMD ["/crossdock/src/driver.sh"] | ||
CMD ["/bin/bash", "/crossdock/src/driver.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
|
||
/node_modules/.bin/babel-node /crossdock/src/http_server.js & | ||
/node_modules/.bin/babel-node /crossdock/src/tchannel_server.js & | ||
|
||
sleep 10 | ||
# unfortunately, we do not check that the above two servers are ready | ||
# before starting the healthcheck handler, so give them some time. | ||
sleep 20 | ||
|
||
/node_modules/.bin/babel-node /crossdock/src/healthcheck_server.js & | ||
|
||
sleep infinity |
Oops, something went wrong.