summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-05-30 11:41:50 -0500
committerMike Greiling <mike@pixelcog.com>2017-05-30 11:41:50 -0500
commit9c6109db341312222e9dd7158c4e5f41809c4aa3 (patch)
treed129651631d091748423a0235685331df7f5d395
parent94ed06562a3ddbe6b46744ac776f232451c798dd (diff)
downloadgitlab-ce-9c6109db341312222e9dd7158c4e5f41809c4aa3.tar.gz
skip asset compression in CI
-rw-r--r--.gitlab-ci.yml1
-rw-r--r--config/webpack.config.js12
2 files changed, 10 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dea11bb9f61..b442e48a3d0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -430,6 +430,7 @@ gitlab:assets:compile:
USE_DB: "false"
SKIP_STORAGE_VALIDATION: "true"
WEBPACK_REPORT: "true"
+ NO_COMPRESSION: "true"
script:
- yarn install --pure-lockfile --production --cache-folder .yarn-cache
- bundle exec rake gitlab:assets:compile
diff --git a/config/webpack.config.js b/config/webpack.config.js
index c77b1d6334c..b7b80f4bf47 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -16,6 +16,7 @@ var DEV_SERVER_HOST = process.env.DEV_SERVER_HOST || 'localhost';
var DEV_SERVER_PORT = parseInt(process.env.DEV_SERVER_PORT, 10) || 3808;
var DEV_SERVER_LIVERELOAD = process.env.DEV_SERVER_LIVERELOAD !== 'false';
var WEBPACK_REPORT = process.env.WEBPACK_REPORT;
+var NO_COMPRESSION = process.env.NO_COMPRESSION;
var config = {
// because sqljs requires fs.
@@ -222,11 +223,16 @@ if (IS_PRODUCTION) {
}),
new webpack.DefinePlugin({
'process.env': { NODE_ENV: JSON.stringify('production') }
- }),
- new CompressionPlugin({
- asset: '[path].gz[query]',
})
);
+
+ if (!NO_COMPRESSION) {
+ config.plugins.push(
+ new CompressionPlugin({
+ asset: '[path].gz[query]',
+ })
+ );
+ }
}
if (IS_DEV_SERVER) {