chore: Reduce deployment times by excluding Docker images (#1945)

* chore: Reduce deployment times by excluding Docker images

Only the Windows and Linux binaries are build during deploy, so we
can save many minutes by excluding Docker images.

* Stop docker image builds on snapshot

* Fix artifact upload

* Skip typecheck for release

* Flag deploy
This commit is contained in:
Kyle Carberry
2022-06-04 19:56:45 +00:00
committed by GitHub
parent c9a4642a12
commit 5edd086b69
5 changed files with 31 additions and 25 deletions
+3 -2
View File
@@ -38,7 +38,7 @@ const dashboardHTMLPluginConfig = new HtmlWebpackPlugin({
template: path.join(templatePath, "index.html"),
})
export const commonWebpackConfig: Configuration = {
export const createCommonWebpackConfig = (options?: { skipTypecheck: boolean }): Configuration => ({
// entry defines each "page" or "chunk". In v1, we have two "pages":
// dashboard and terminal. This is desired because the terminal has the xterm
// vendor, and it is undesireable to load all of xterm on a dashboard
@@ -78,6 +78,7 @@ export const commonWebpackConfig: Configuration = {
loader: "ts-loader",
options: {
configFile: "tsconfig.prod.json",
transpileOnly: options?.skipTypecheck,
},
},
],
@@ -106,4 +107,4 @@ export const commonWebpackConfig: Configuration = {
// plugins customize the build process
plugins: [environmentPlugin, dashboardHTMLPluginConfig],
}
})
+4 -2
View File
@@ -5,14 +5,16 @@
import ReactRefreshWebpackPlugin from "@pmmmwh/react-refresh-webpack-plugin"
import { Configuration } from "webpack"
import "webpack-dev-server"
import { commonWebpackConfig } from "./webpack.common"
import { createCommonWebpackConfig } from "./webpack.common"
const commonWebpackConfig = createCommonWebpackConfig()
const commonPlugins = commonWebpackConfig.plugins || []
const commonRules = commonWebpackConfig.module?.rules || []
const config: Configuration = {
...commonWebpackConfig,
...createCommonWebpackConfig,
// devtool controls how source maps are generated. In development, we want
// more details (less optimized) for more readability and an easier time
+7 -1
View File
@@ -6,7 +6,13 @@ import CopyWebpackPlugin from "copy-webpack-plugin"
import CSSMinimizerPlugin from "css-minimizer-webpack-plugin"
import MiniCSSExtractPlugin from "mini-css-extract-plugin"
import { Configuration } from "webpack"
import { commonWebpackConfig } from "./webpack.common"
import { createCommonWebpackConfig } from "./webpack.common"
const commonWebpackConfig = createCommonWebpackConfig({
// This decreases compilation time when publishing releases.
// The "test/js" step will already catch any TypeScript compilation errors.
skipTypecheck: true,
})
const commonPlugins = commonWebpackConfig.plugins || []