From adf56c9806bf0318632885b6fbca0a30bf7aa603 Mon Sep 17 00:00:00 2001 From: Jordan Husney Date: Sat, 5 Nov 2016 12:04:02 -0400 Subject: [PATCH] Disable S3 deployment when performing continuous integration --- webpack/webpack.config.prod.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/webpack/webpack.config.prod.js b/webpack/webpack.config.prod.js index 1a679e6ae5c..8b31ca2fdee 100644 --- a/webpack/webpack.config.prod.js +++ b/webpack/webpack.config.prod.js @@ -32,16 +32,19 @@ const deployPlugins = []; if (process.env.DEPLOY) { deployPlugins.push(new webpack.optimize.UglifyJsPlugin({compressor: {warnings: false}, comments: /(?:)/})); deployPlugins.push(new webpack.LoaderOptionsPlugin({comments: false})); - deployPlugins.push(new S3Plugin({ - s3Options: { - accessKeyId: process.env.AWS_ACCESS_KEY_ID, - secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, - region: process.env.AWS_REGION - }, - s3UploadOptions: { - Bucket: process.env.AWS_S3_BUCKET - }, - })); + if (!process.env.CI) { + // do not deploy to S3 if running in continuous integration environment: + deployPlugins.push(new S3Plugin({ + s3Options: { + accessKeyId: process.env.AWS_ACCESS_KEY_ID, + secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, + region: process.env.AWS_REGION + }, + s3UploadOptions: { + Bucket: process.env.AWS_S3_BUCKET + }, + })); + } } export default {