forked from intershop/intershop-pwa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_reports
24 lines (22 loc) · 1.32 KB
/
Dockerfile_reports
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# To build this report image, you will have to temporarily truncate the .dockerignore
# synchronize-marker:docker-cache-share:begin
FROM node:18.16.0-alpine as buildstep
ENV CI=true
WORKDIR /workspace
COPY package.json package-lock.json /workspace/
RUN npm ci --prefer-offline --no-audit --ignore-scripts
RUN find node_modules -path '*/esbuild/install.js' | xargs -rt -n 1 node
RUN npm run ngcc
# synchronize-marker:docker-cache-share:end
ENV NODE_OPTIONS="--max_old_space_size=8192"
COPY . /workspace/
RUN npm run postinstall
RUN npm i --no-save jest-html-reporter jest-junit && npx jest -c jest-reports.config.js --ci --testFailureExitCode 0
RUN npx license-checker --csv --out reports/licenses/licenses.csv --customPath templates/3rd-party-licenses_format.json && npm i --no-save htmlify-csv && node node_modules/htmlify-csv/htmlify-csv convert reports/licenses/licenses.csv --output reports/licenses/index.html
RUN npm run compodoc
RUN npm i --no-save jscpd-html-reporter && node reports/jscpd-report
RUN npm i -g webpack-bundle-analyzer
RUN rm -Rf dist && npm run build client -- --progress false --stats-json && webpack-bundle-analyzer dist/browser/stats.json dist/browser -r reports/bundle_prod/index.html -m static
FROM danjellz/http-server
COPY --from=buildstep /workspace/reports /public
COPY --from=buildstep /workspace/docs /public/docs