forked from instructure/canvas-lms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.jenkins-cache
73 lines (64 loc) · 3.79 KB
/
Dockerfile.jenkins-cache
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# syntax = docker/dockerfile:1.0-experimental
FROM busybox AS cache-helper-collect-gems
RUN mkdir -p /tmp/dst /tmp/dst
WORKDIR /tmp/src
RUN --mount=target=/tmp/src find gems -name "Gemfile" -exec cp --parents {} /tmp/dst \;
RUN --mount=target=/tmp/src find gems -name "Gemfile.d" -exec cp -rf --parents {} /tmp/dst \;
RUN --mount=target=/tmp/src find gems -name "Gemfile.lock" -exec cp --parents {} /tmp/dst \;
RUN --mount=target=/tmp/src find gems -name "*.gemspec" -exec cp --parents {} /tmp/dst \;
RUN --mount=target=/tmp/src find gems -name "gem_version.rb" -exec cp --parents {} /tmp/dst \;
RUN --mount=target=/tmp/src find gems -name "version.rb" -exec cp --parents {} /tmp/dst \;
FROM busybox AS cache-helper-collect-yarn
RUN mkdir -p /tmp/dst /tmp/dst
WORKDIR /tmp/src
RUN --mount=target=/tmp/src find gems/canvas_i18nliner -name 'package.json' -exec cp --parents {} /tmp/dst \;
RUN --mount=target=/tmp/src find gems/plugins/* -name 'package.json' -exec cp --parents {} /tmp/dst \;
RUN --mount=target=/tmp/src find packages/* -name 'package.json' -exec cp --parents {} /tmp/dst \;
RUN --mount=target=/tmp/src find client_apps/* -name 'package.json' -exec cp --parents {} /tmp/dst \;
FROM busybox AS cache-helper-collect-webpack
RUN mkdir -p /tmp/dst /tmp/dst
WORKDIR /tmp/src
RUN --mount=target=/tmp/src find gems -type d \
-not -path "gems" \
-not -path "gems/plugins" \
-maxdepth 2 \
-path "gems/*/lib" \
-exec cp -rf --parents {} /tmp/dst \;
RUN --mount=target=/tmp/src find gems/canvas_i18nliner \
-not -path "gems/canvas_i18nliner" \
-not -path "gems/canvas_i18nliner/spec" \
-not -path "gems/canvas_i18nliner/spec/*" \
-exec cp -rf --parents {} /tmp/dst \;
RUN --mount=target=/tmp/src find gems/plugins -path "*/app/coffeescripts" -exec cp -rf --parents {} /tmp/dst \;
RUN --mount=target=/tmp/src find gems/plugins -path "*/app/jsx" -exec cp -rf --parents {} /tmp/dst \;
RUN --mount=target=/tmp/src find gems/plugins -path "*/app/stylesheets" -exec cp -rf --parents {} /tmp/dst \;
RUN --mount=target=/tmp/src find gems/plugins -path "*/app/views/jst" -exec cp -rf --parents {} /tmp/dst \;
RUN --mount=target=/tmp/src find gems/plugins -path "*/public" -exec cp -rf --parents {} /tmp/dst \;
RUN --mount=target=/tmp/src mkdir -p /tmp/dst/config && \
cp -rf config/application.rb /tmp/dst/config && \
cp -rf config/boot.rb /tmp/dst/config && \
cp -rf config/brandable_css.yml /tmp/dst/config && \
cp -rf config/browsers.yml /tmp/dst/config && \
cp -rf config/canvas_rails_switcher.rb /tmp/dst/config && \
cp -rf config/environment.rb /tmp/dst/config
RUN --mount=target=/tmp/src mkdir -p /tmp/dst/config/initializers && \
cp -rf config/initializers/plugin_symlinks.rb /tmp/dst/config/initializers/ && \
cp -rf config/initializers/client_app_symlinks.rb /tmp/dst/config/initializers/ && \
cp -rf config/initializers/json.rb /tmp/dst/config/initializers/ && \
cp -rf config/initializers/revved_asset_urls.rb /tmp/dst/config/initializers/
RUN --mount=target=/tmp/src cp -rf config/environments --parents /tmp/dst
RUN --mount=target=/tmp/src cp -rf config/locales --parents /tmp/dst
RUN --mount=target=/tmp/src mkdir -p /tmp/dst/lib && \
cp -rf lib/brandable_css.rb /tmp/dst/lib && \
cp -rf lib/canvas_logger.rb /tmp/dst/lib && \
cp -rf lib/canvas_yaml.rb /tmp/dst/lib && \
cp -rf lib/config_file.rb /tmp/dst/lib && \
cp -rf lib/logging_filter.rb /tmp/dst/lib && \
cp -rf lib/request_cache.rb /tmp/dst/lib && \
cp -rf lib/temp_cache.rb /tmp/dst/lib
RUN --mount=target=/tmp/src mkdir -p /tmp/dst/lib/canvas && \
cp -rf lib/canvas/cdn.rb /tmp/dst/lib/canvas/ && \
cp -rf lib/canvas/reloader.rb /tmp/dst/lib/canvas/
RUN --mount=target=/tmp/src cp -rf lib/canvas/cdn --parents /tmp/dst
RUN --mount=target=/tmp/src cp -rf lib/rake --parents /tmp/dst
RUN --mount=target=/tmp/src cp -rf lib/tasks --parents /tmp/dst