diff --git a/Dockerfiletest b/Dockerfiletest new file mode 100644 index 0000000..023e240 --- /dev/null +++ b/Dockerfiletest @@ -0,0 +1,16 @@ +FROM quay.io/centos/centos:7 + +# Set PATH, because "scl enable" does not have any effects to "docker build" +ENV PATH /opt/rh/rh-nodejs10/root/usr/bin:$PATH + +# enable scl with nodejs8 +RUN yum install centos-release-scl-rh -y && \ + yum install rh-nodejs10 rh-nodejs10-npm -y && \ + yum clean all && \ + npm install -g yarn + +ENV APP_ROOT /opt/qontract-server +ADD . ${APP_ROOT} +WORKDIR ${APP_ROOT} + +RUN yarn install && yarn run lint && yarn test diff --git a/pr_check.sh b/pr_check.sh index e0f855c..0c36dcf 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -1,12 +1,3 @@ #!/bin/bash -npm install tslint -npm install typescript -npm install mocha -npm install yarn - -CURRENT_DIR=$(pwd) - -$CURRENT_DIR/node_modules/yarn/bin/yarn run lint - -$CURRENT_DIR/node_modules/yarn/bin/yarn test +docker build --pull -t quay.io/app-sre/qontract-server:test -f Dockerfiletest .