diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-06-06 15:53:21 +0800 |
---|---|---|
committer | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-06-07 07:45:48 +0800 |
commit | 904b38820aee23d90ce04426ebd84b0eaf4c983a (patch) | |
tree | cd99b594f8143558128ff202f83c89ff885d289a /scripts | |
parent | e6a88b024fa7f8e1ec5b712744d0e0d118b026e6 (diff) | |
download | gitlab-ce-tar-assets-compile-cache-artifacts.tar.gz |
Tar assets-compile-cache cache filestar-assets-compile-cache-artifacts
Speeds up zipping and uploading of cache
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/assets-compile-cache/archive | 10 | ||||
-rwxr-xr-x | scripts/assets-compile-cache/clean-old-assets (renamed from scripts/clean-old-cached-assets) | 0 | ||||
-rwxr-xr-x | scripts/assets-compile-cache/extract | 9 |
3 files changed, 19 insertions, 0 deletions
diff --git a/scripts/assets-compile-cache/archive b/scripts/assets-compile-cache/archive new file mode 100755 index 00000000000..85b145ec3b4 --- /dev/null +++ b/scripts/assets-compile-cache/archive @@ -0,0 +1,10 @@ +#!/bin/bash + +echo "Archiving cache files..." + +mkdir -p cache_archives +[ -d vendor/ruby ] && tar -czf cache_archives/vendor-ruby.tar.gz vendor/ruby +[ -d .yarn-cache ] && tar -czf cache_archives/yarn-cache.tar.gz .yarn-cache +[ -d tmp/cache/assets/sprockets ] && tar -czf cache_archives/tmp-cache-assets-sprockets.tar.gz tmp/cache/assets/sprockets + +echo "Done!" diff --git a/scripts/clean-old-cached-assets b/scripts/assets-compile-cache/clean-old-assets index 8bdd3a9cdb6..8bdd3a9cdb6 100755 --- a/scripts/clean-old-cached-assets +++ b/scripts/assets-compile-cache/clean-old-assets diff --git a/scripts/assets-compile-cache/extract b/scripts/assets-compile-cache/extract new file mode 100755 index 00000000000..aebf92a9347 --- /dev/null +++ b/scripts/assets-compile-cache/extract @@ -0,0 +1,9 @@ +#!/bin/bash + +echo "Extracting cache files..." + +[ -f cache_archives/vendor-ruby.tar.gz ] && tar -xzf cache_archives/vendor-ruby.tar.gz +[ -f cache_archives/yarn-cache.tar.gz ] && tar -xzf cache_archives/yarn-cache.tar.gz +[ -f cache_archives/tmp-cache-assets-sprockets.tar.gz ] && tar -xzf cache_archives/tmp-cache-assets-sprockets.tar.gz + +echo "Done!" |