summaryrefslogtreecommitdiff
path: root/scripts/assets-compile-cache/archive
diff options
context:
space:
mode:
authorHeinrich Lee Yu <heinrich@gitlab.com>2019-06-06 15:53:21 +0800
committerHeinrich Lee Yu <heinrich@gitlab.com>2019-06-07 07:45:48 +0800
commit904b38820aee23d90ce04426ebd84b0eaf4c983a (patch)
treecd99b594f8143558128ff202f83c89ff885d289a /scripts/assets-compile-cache/archive
parente6a88b024fa7f8e1ec5b712744d0e0d118b026e6 (diff)
downloadgitlab-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/assets-compile-cache/archive')
-rwxr-xr-xscripts/assets-compile-cache/archive10
1 files changed, 10 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!"