forked from intershop/intershop-pwa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_reports
18 lines (17 loc) · 1.15 KB
/
Dockerfile_reports
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM node:12-alpine as reporting
COPY package.json package-lock.json /workspace/
COPY tslint-rules /workspace/tslint-rules/
WORKDIR /workspace
ENV CI=true
RUN npm i
COPY . /workspace/
RUN 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 docs
RUN npm i --no-save tslint-html-report && node reports/tslint-report
RUN npm i --no-save jscpd-html-reporter && node reports/jscpd-report
RUN rm -Rf dist && npx ng build --progress false --aot --stats-json && npx webpack-bundle-analyzer dist/browser/stats-es2015.json dist/browser -r reports/bundle_aot/index.html -m static
RUN rm -Rf dist && npx ng build --progress false --prod --stats-json && npx webpack-bundle-analyzer dist/browser/stats-es2015.json dist/browser -r reports/bundle_prod/index.html -m static
FROM danjellz/http-server
COPY --from=reporting /workspace/reports /public
COPY --from=reporting /workspace/docs /public/docs