2023-03-09 22:57:40 +08:00
|
|
|
# syntax = starlord.inscloudgate.net/jenkins/dockerfile:1.5.2
|
2020-10-19 22:08:40 +08:00
|
|
|
|
2022-09-24 03:26:58 +08:00
|
|
|
FROM starlord.inscloudgate.net/jenkins/core:focal
|
|
|
|
SHELL ["/usr/bin/bash", "-c"]
|
2020-10-19 22:08:40 +08:00
|
|
|
WORKDIR /tmp/src
|
2020-11-14 03:08:58 +08:00
|
|
|
RUN --mount=target=/tmp/src \
|
|
|
|
mkdir -p /tmp/dst && \
|
2022-11-29 10:49:29 +08:00
|
|
|
set -o errexit -o errtrace -o nounset -o pipefail && \
|
2022-09-21 22:20:27 +08:00
|
|
|
shopt -s globstar && \
|
2022-09-30 02:07:33 +08:00
|
|
|
tar --sort=name --mtime='1970-01-01' --owner=0 --group=0 --numeric-owner --mode='a+rwX' -cf - \
|
2020-11-14 03:08:58 +08:00
|
|
|
config/canvas_rails_switcher.rb \
|
|
|
|
Gemfile \
|
keep lockfiles in sync as part of `bundle` commands
closes AE-283
this eliminates script/sync_lockfiles.rb and integrates its
functionality directly into `bundle install`, `bundle check`, etc.
it also generalizes a few pieces so that the same approach is used
for all use cases:
* syncing versions between the main Gemfile and gems in gems/
* maintaining separate lockfiles for no plugins/including
private plugins
* maintaining separate lockfiles for multiple Rails versions
(crossed with the previous bullet)
The differences between them are just small variations on how strict
versions must match between lockfiles, and requiring pinning of
versions not in the default lockfile.
For full details, checks the docs on BundlerLockfileExtensions
This does change the strategy for filtering private plugin dependencies
out of the committed lockfile(s) - instead of filtering based on hash
of source, simply don't even include private plugin gems in the gemfile
when building the filtered lockfile (i.e. dynamic Gemfile, rather than
monkeypatching bundler to filter out -- semi-succesfully -- private
plugins from the Definition).
It also changes the "default" lockfile for Canvas that gets checked
in to be Gemfile.lock, so that other tools that are not
multi-lockfile aware can find it (such as rubocop, dependabot, and
others). This will be the lockfile corresponding to the current
default rails version for Canvas, and without private plugins.
Change-Id: I7ba398381974acbc4445f34fa3b788e8a07c5ce6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317888
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-05-11 02:12:39 +08:00
|
|
|
Gemfile*.lock \
|
2020-11-14 03:08:58 +08:00
|
|
|
Gemfile.d \
|
2022-09-21 22:20:27 +08:00
|
|
|
gems/**/Gemfile \
|
keep lockfiles in sync as part of `bundle` commands
closes AE-283
this eliminates script/sync_lockfiles.rb and integrates its
functionality directly into `bundle install`, `bundle check`, etc.
it also generalizes a few pieces so that the same approach is used
for all use cases:
* syncing versions between the main Gemfile and gems in gems/
* maintaining separate lockfiles for no plugins/including
private plugins
* maintaining separate lockfiles for multiple Rails versions
(crossed with the previous bullet)
The differences between them are just small variations on how strict
versions must match between lockfiles, and requiring pinning of
versions not in the default lockfile.
For full details, checks the docs on BundlerLockfileExtensions
This does change the strategy for filtering private plugin dependencies
out of the committed lockfile(s) - instead of filtering based on hash
of source, simply don't even include private plugin gems in the gemfile
when building the filtered lockfile (i.e. dynamic Gemfile, rather than
monkeypatching bundler to filter out -- semi-succesfully -- private
plugins from the Definition).
It also changes the "default" lockfile for Canvas that gets checked
in to be Gemfile.lock, so that other tools that are not
multi-lockfile aware can find it (such as rubocop, dependabot, and
others). This will be the lockfile corresponding to the current
default rails version for Canvas, and without private plugins.
Change-Id: I7ba398381974acbc4445f34fa3b788e8a07c5ce6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317888
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-05-11 02:12:39 +08:00
|
|
|
gems/**/Gemfile.lock \
|
2022-09-21 22:20:27 +08:00
|
|
|
gems/**/*.gemspec \
|
|
|
|
gems/**/gem_version.rb \
|
|
|
|
gems/**/version.rb \
|
|
|
|
gems/plugins/**/Gemfile.d \
|
2023-09-12 23:20:10 +08:00
|
|
|
vendor/gems/bundler-multilock \
|
2020-11-14 03:08:58 +08:00
|
|
|
\
|
2022-09-24 03:26:58 +08:00
|
|
|
| tee /tmp/dst/ruby-runner.tar | md5sum > /tmp/dst/ruby-runner.tar.md5 && \
|
|
|
|
\
|
2022-09-30 02:07:33 +08:00
|
|
|
tar --sort=name --mtime='1970-01-01' --owner=0 --group=0 --numeric-owner --mode='a+rwX' -cf - \
|
2020-11-14 03:08:58 +08:00
|
|
|
package.json \
|
|
|
|
yarn.lock \
|
2022-09-21 22:20:27 +08:00
|
|
|
gems/plugins/**/package.json \
|
|
|
|
ui/engine/**/package.json \
|
|
|
|
ui/shared/**/package.json \
|
|
|
|
packages/**/package.json \
|
2020-11-14 03:08:58 +08:00
|
|
|
\
|
2022-09-24 03:26:58 +08:00
|
|
|
| tee /tmp/dst/yarn-runner.tar | md5sum > /tmp/dst/yarn-runner.tar.md5 && \
|
|
|
|
\
|
2022-09-30 02:07:33 +08:00
|
|
|
tar --sort=name --mtime='1970-01-01' --owner=0 --group=0 --numeric-owner --mode='a+rwX' -cf - \
|
2022-09-30 23:31:13 +08:00
|
|
|
--exclude='**/__mocks__' \
|
|
|
|
--exclude='**/__tests__' \
|
|
|
|
--exclude='**/*.test.js' \
|
2022-06-22 07:49:54 +08:00
|
|
|
ui/engine \
|
2020-11-24 06:39:47 +08:00
|
|
|
packages \
|
|
|
|
\
|
2022-09-24 03:26:58 +08:00
|
|
|
| tee /tmp/dst/webpack-builder.tar | md5sum > /tmp/dst/webpack-builder.tar.md5 && \
|
|
|
|
\
|
2022-09-30 02:07:33 +08:00
|
|
|
tar --sort=name --mtime='1970-01-01' --owner=0 --group=0 --numeric-owner --mode='a+rwX' -cf - \
|
2020-11-14 03:08:58 +08:00
|
|
|
bin \
|
|
|
|
config/environments \
|
2022-09-29 00:22:06 +08:00
|
|
|
gems/{autoextend,canvas_color,canvas_text_helper,config_file,i18n_extraction,i18n_tasks,utf8_cleaner}/lib \
|
2020-11-14 03:08:58 +08:00
|
|
|
lib/canvas/cdn \
|
|
|
|
lib/rake \
|
|
|
|
lib/tasks \
|
2021-10-19 05:18:03 +08:00
|
|
|
ui-build \
|
2020-11-14 03:08:58 +08:00
|
|
|
\
|
|
|
|
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 \
|
2021-02-02 03:59:28 +08:00
|
|
|
gems/plugins/.i18n* \
|
2020-11-14 03:08:58 +08:00
|
|
|
lib/brandable_css.rb \
|
|
|
|
lib/canvas_logger.rb \
|
|
|
|
lib/logging_filter.rb \
|
|
|
|
lib/canvas/cdn.rb \
|
2022-06-02 23:00:41 +08:00
|
|
|
lib/base/canvas/reloader.rb \
|
2020-11-14 03:08:58 +08:00
|
|
|
.i18nignore \
|
|
|
|
.i18nrc \
|
|
|
|
Rakefile \
|
|
|
|
gulpfile.js \
|
|
|
|
webpack.config.js \
|
|
|
|
\
|
2022-09-24 03:26:58 +08:00
|
|
|
| tee /tmp/dst/webpack-runner-dependencies.tar | md5sum > /tmp/dst/webpack-runner-dependencies.tar.md5 && \
|
|
|
|
\
|
2022-09-30 02:07:33 +08:00
|
|
|
tar --sort=name --mtime='1970-01-01' --owner=0 --group=0 --numeric-owner --mode='a+rwX' -cf - \
|
2022-09-21 05:38:31 +08:00
|
|
|
--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 \
|
|
|
|
\
|
2022-09-24 03:26:58 +08:00
|
|
|
| tee /tmp/dst/webpack-runner.tar | md5sum > /tmp/dst/webpack-runner.tar.md5 && \
|
|
|
|
\
|
2022-11-30 21:12:43 +08:00
|
|
|
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 && \
|
|
|
|
\
|
2023-03-15 22:32:07 +08:00
|
|
|
{ \
|
|
|
|
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/coffeescripts \
|
|
|
|
spec/javascripts \
|
|
|
|
spec/selenium/helpers/jquery.simulate.js \
|
|
|
|
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 \
|
|
|
|
} && \
|
2022-09-24 03:26:58 +08:00
|
|
|
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 && \
|
2022-11-30 21:12:43 +08:00
|
|
|
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
|