Skip to content

Commit

Permalink
User container to run yarn for pr_check intead of installing yarn run…
Browse files Browse the repository at this point in the history
…ning in Jenkins executor. (#119)
  • Loading branch information
OliviaHY authored Oct 1, 2021
1 parent 5c78f5d commit 042e181
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
16 changes: 16 additions & 0 deletions Dockerfiletest
Original file line number Diff line number Diff line change
@@ -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
11 changes: 1 addition & 10 deletions pr_check.sh
Original file line number Diff line number Diff line change
@@ -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 .

0 comments on commit 042e181

Please sign in to comment.