Commit 87e9fe3e authored by Mark Harding's avatar Mark Harding

(chore): ci configs

parent 6a3dac72
No related merge requests found
Pipeline #108881940 failed with stages
in 29 minutes and 9 seconds
image: markharding/minds-front-base
image: minds/ci-front:latest
stages:
- test
......@@ -17,7 +17,7 @@ variables:
CYPRESS_CACHE_FOLDER: '$CI_PROJECT_DIR/cache/Cypress'
test:
image: circleci/node:8-browsers
image: circleci/node:13-browsers
stage: test
script:
- npm ci
......@@ -88,6 +88,7 @@ build:review:
- npm run postinstall
- gulp build.sass && gulp build.sass ##weird build needs to be run twice for now
- sh build/base-locale.sh dist
- ng run minds:server:production
artifacts:
name: '$CI_COMMIT_REF_SLUG'
paths:
......@@ -155,8 +156,8 @@ prepare:review:
- docker:dind
script:
- docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY}
- docker build -t $CI_REGISTRY_IMAGE/front-init:$CI_PIPELINE_ID -f containers/front-init/Dockerfile dist/.
- docker push $CI_REGISTRY_IMAGE/front-init:$CI_PIPELINE_ID
- docker build -t $CI_REGISTRY_IMAGE/server:$CI_PIPELINE_ID -f containers/server/Dockerfile dist/.
- docker push $CI_REGISTRY_IMAGE/server:$CI_PIPELINE_ID
dependencies:
- build:review
except:
......@@ -233,7 +234,8 @@ review:start:
- "helm upgrade \
--install \
--reuse-values \
--set frontInit.image.repository=$CI_REGISTRY_IMAGE/front-init \
--set nginx.image.tag=ssr \
--set frontInit.image.repository=$CI_REGISTRY_IMAGE/server \
--set-string frontInit.image.tag=$CI_PIPELINE_ID \
--set domain=$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN \
--set elasticsearch.clusterName=$CI_BUILD_REF_SLUG--elasticsearch \
......
FROM alpine:edge
RUN apk add --no-cache \
chromium \
git \
build-base \
libstdc++ \
make \
g++ \
python \
curl \
udev \
nodejs=8.9.1-r0 \
libsass
RUN npm install -g typescript gulp @angular/cli
ENV CHROME_BIN=/usr/bin/chromium-browser
\ No newline at end of file
FROM node:13-alpine
RUN apk add --no-cache \
git \
libsass
RUN npm install -g typescript @angular/cli
# Gitlab CI has limited memory
ENV NODE_OPTIONS="--max-old-space-size=1024"
\ No newline at end of file
......@@ -3,4 +3,6 @@
###
FROM node:13-alpine
CMD node server
\ No newline at end of file
COPY . /dist
CMD node /dist/server
\ No newline at end of file
......@@ -29,7 +29,7 @@ app.use(compression());
app.use(cookieparser());
const PORT = process.env.PORT || 4200;
const DIST_FOLDER = join(process.cwd(), 'dist');
const DIST_FOLDER = join(process.cwd(), 'dist/en');
const template = readFileSync(join(DIST_FOLDER, 'index.html')).toString();
const win = domino.createWindow(template);
......
......@@ -3,7 +3,7 @@ export class Material {
window.componentHandler.upgradeDom();
}
static updateElement(element: any) {
if (window.componentHandler)
if (window.componentHandler)
window.componentHandler.upgradeElement(element);
}
}
Please register or to comment