forked from instructure/canvas-lms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.jenkins-cache
132 lines (131 loc) · 4.68 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# syntax = starlord.inscloudgate.net/jenkins/dockerfile:1.5.2
FROM starlord.inscloudgate.net/jenkins/core:focal
SHELL ["/usr/bin/bash", "-c"]
WORKDIR /tmp/src
RUN --mount=target=/tmp/src \
mkdir -p /tmp/dst && \
set -o errexit -o errtrace -o nounset -o pipefail && \
shopt -s globstar && \
tar --sort=name --mtime='1970-01-01' --owner=0 --group=0 --numeric-owner --mode='a+rwX' -cf - \
config/canvas_rails_switcher.rb \
Gemfile \
Gemfile*.lock \
Gemfile.d \
gems/gemfile_prefix.rb \
gems/**/Gemfile \
gems/**/Gemfile.lock \
gems/**/*.gemspec \
gems/**/gem_version.rb \
gems/**/version.rb \
gems/plugins/**/Gemfile.d \
vendor/gems/bundler-multilock \
\
| tee /tmp/dst/ruby-runner.tar | md5sum > /tmp/dst/ruby-runner.tar.md5 && \
\
tar --sort=name --mtime='1970-01-01' --owner=0 --group=0 --numeric-owner --mode='a+rwX' -cf - \
package.json \
yarn.lock \
gems/plugins/**/package.json \
ui/engine/**/package.json \
ui/shared/**/package.json \
packages/**/package.json \
\
| tee /tmp/dst/yarn-runner.tar | md5sum > /tmp/dst/yarn-runner.tar.md5 && \
\
tar --sort=name --mtime='1970-01-01' --owner=0 --group=0 --numeric-owner --mode='a+rwX' -cf - \
--exclude='**/__mocks__' \
--exclude='**/__tests__' \
--exclude='**/*.test.js' \
ui/engine \
packages \
\
| tee /tmp/dst/webpack-builder.tar | md5sum > /tmp/dst/webpack-builder.tar.md5 && \
\
tar --sort=name --mtime='1970-01-01' --owner=0 --group=0 --numeric-owner --mode='a+rwX' -cf - \
bin \
config/environments \
gems/{autoextend,canvas_color,canvas_text_helper,config_file,i18n_extraction,i18n_tasks,utf8_cleaner}/lib \
lib/canvas/cdn \
lib/rake \
lib/tasks \
ui-build \
\
config/application.rb \
config/boot.rb \
config/brandable_css.yml \
config/browsers.yml \
config/canvas_rails_switcher.rb \
config/environment.rb \
config/initializers/json.rb \
config/initializers/revved_asset_urls.rb \
db/migrate/*_regenerate_brand_files_based_on_new_defaults_*.rb \
gems/plugins/.i18n* \
lib/brandable_css.rb \
lib/canvas_logger.rb \
lib/logging_filter.rb \
lib/canvas/cdn.rb \
lib/base/canvas/reloader.rb \
.i18nignore \
.i18nrc \
Rakefile \
gulpfile.js \
rspack.config.js \
\
| tee /tmp/dst/webpack-runner-dependencies.tar | md5sum > /tmp/dst/webpack-runner-dependencies.tar.md5 && \
\
tar --sort=name --mtime='1970-01-01' --owner=0 --group=0 --numeric-owner --mode='a+rwX' -cf - \
--exclude='**/__mocks__' \
--exclude='**/__tests__' \
app/stylesheets \
config/locales \
gems/**/config/locales \
gems/plugins/**/app/coffeescripts \
gems/plugins/**/app/jsx \
gems/plugins/**/app/stylesheets \
gems/plugins/**/app/views/jst \
gems/plugins/**/public \
public \
ui \
\
| tee /tmp/dst/webpack-runner.tar | md5sum > /tmp/dst/webpack-runner.tar.md5 && \
\
tar --sort=name --mtime='1970-01-01' --owner=0 --group=0 --numeric-owner --mode='a+rwX' -cf - \
--exclude='vendor/qti_migration_tool' \
vendor \
\
| tee /tmp/dst/webpack-runner-vendor.tar | md5sum > /tmp/dst/webpack-runner-vendor.tar.md5 && \
\
{ \
if [ -d 'spec' ]; then \
tar --sort=name --mtime='1970-01-01' --owner=0 --group=0 --numeric-owner --mode='a+rwX' -cf - \
app/stylesheets \
config/brandable_css.yml \
config/browsers.yml \
gems/plugins/**/app/coffeescripts \
gems/plugins/**/app/jsx \
gems/plugins/**/app/stylesheets \
gems/plugins/**/public \
gems/plugins/**/spec_canvas/coffeescripts \
jest \
packages \
public \
spec/fixtures \
tmp \
ui \
ui-build \
jest.config.js \
karma.conf.js \
package.json \
tsconfig.json \
yarn.lock \
\
| tee /tmp/dst/js.tar | md5sum > /tmp/dst/js.tar.md5; \
fi \
} && \
touch /tmp/dst/environment.sh && \
echo "RUBY_RUNNER_MD5=$(cat /tmp/dst/ruby-runner.tar.md5 | cut -d' ' -f1)" >> /tmp/dst/environment.sh && \
echo "YARN_RUNNER_MD5=$(cat /tmp/dst/yarn-runner.tar.md5 | cut -d' ' -f1)" >> /tmp/dst/environment.sh && \
echo "WEBPACK_BUILDER_MD5=$(cat /tmp/dst/webpack-builder.tar.md5 | cut -d' ' -f1)" >> /tmp/dst/environment.sh && \
echo "WEBPACK_RUNNER_MD5=$(cat /tmp/dst/webpack-runner.tar.md5 | cut -d' ' -f1)" >> /tmp/dst/environment.sh && \
echo "WEBPACK_RUNNER_DEPENDENCIES_MD5=$(cat /tmp/dst/webpack-runner-dependencies.tar.md5 | cut -d' ' -f1)" >> /tmp/dst/environment.sh && \
echo "WEBPACK_RUNNER_VENDOR_MD5=$(cat /tmp/dst/webpack-runner-vendor.tar.md5 | cut -d' ' -f1)" >> /tmp/dst/environment.sh