forked from instructure/canvas-lms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.jenkins.webpack-runner
28 lines (26 loc) · 1.41 KB
/
Dockerfile.jenkins.webpack-runner
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM local/webpack-builder
RUN \
--mount=type=bind,from=local/cache-helper,source=/tmp/dst,target=/cache-helper \
--mount=type=bind,from=local/webpack-assets-previous,target=/mount/webpack-assets-previous \
--mount=type=bind,from=local/webpack-cache-previous,target=/mount/webpack-cache-previous \
tar --no-same-owner -xf /cache-helper/webpack-runner-dependencies.tar -C ${APP_HOME} && \
tar --no-same-owner -xf /cache-helper/webpack-runner-vendor.tar -C ${APP_HOME} && \
if [ -n "$(tar tf /cache-helper/webpack-runner-vendor.tar)" ]; then bundle config --global frozen false ; fi && \
tar --no-same-owner -xf /cache-helper/webpack-runner.tar -C ${APP_HOME} && \
{ { cd /mount/webpack-assets-previous/usr/src/app && cp --parents -rf public/dist/brandable_css ${APP_HOME}; } || true; } && \
{ { cd /mount/webpack-cache-previous && cp --parents -rf node_modules/.cache ${APP_HOME}; } || true; }
ARG JS_BUILD_NO_UGLIFY=0
ARG RAILS_LOAD_ALL_LOCALES=0
ARG USE_BUILD_CACHE=0
ARG WRITE_BUILD_CACHE=0
ARG CRYSTALBALL_MAP=0
RUN COMPILE_ASSETS_API_DOCS=0 \
COMPILE_ASSETS_BRAND_CONFIGS=0 \
COMPILE_ASSETS_NPM_INSTALL=0 \
COMPILE_ASSETS_STYLEGUIDE=0 \
JS_BUILD_NO_UGLIFY="$JS_BUILD_NO_UGLIFY" \
RAILS_LOAD_ALL_LOCALES="$RAILS_LOAD_ALL_LOCALES" \
USE_BUILD_CACHE="$USE_BUILD_CACHE" \
WRITE_BUILD_CACHE="$WRITE_BUILD_CACHE" \
CRYSTALBALL_MAP="$CRYSTALBALL_MAP" \
bundle exec rails canvas:compile_assets