diff --git a/core/src/commands/dev.ts b/core/src/commands/dev.ts index 3e100584b5..f7159bd825 100644 --- a/core/src/commands/dev.ts +++ b/core/src/commands/dev.ts @@ -41,6 +41,7 @@ const devArgs = { } const devOpts = { + "force": new BooleanParameter({ help: "Force redeploy of service(s)." }), "hot-reload": new StringsParameter({ help: deline`The name(s) of the service(s) to deploy with hot reloading enabled. Use comma as a separator to specify multiple services. Use * to deploy all @@ -85,6 +86,7 @@ export class DevCommand extends Command { garden dev --hot=foo-service,bar-service # enable hot reloading for foo-service and bar-service garden dev --hot=* # enable hot reloading for all compatible services garden dev --skip-tests= # skip running any tests + garden dev --force # force redeploy of services when the command starts garden dev --name integ # run all tests with the name 'integ' in the project garden test --name integ* # run all tests with the name starting with 'integ' in the project ` @@ -165,6 +167,7 @@ export class DevCommand extends Command { devModeServiceNames, hotReloadServiceNames, skipTests, + forceDeploy: opts.force, }) const results = await processModules({ @@ -204,6 +207,7 @@ export async function getDevCommandInitialTasks({ devModeServiceNames, hotReloadServiceNames, skipTests, + forceDeploy, }: { garden: Garden log: LogEntry @@ -213,6 +217,7 @@ export async function getDevCommandInitialTasks({ devModeServiceNames: string[] hotReloadServiceNames: string[] skipTests: boolean + forceDeploy: boolean }) { const moduleTasks = flatten( await Bluebird.map(modules, async (module) => { @@ -235,7 +240,7 @@ export async function getDevCommandInitialTasks({ module, devModeServiceNames, hotReloadServiceNames, - force: false, + force: forceDeploy, forceBuild: false, }) diff --git a/docs/reference/commands.md b/docs/reference/commands.md index 43172ebdf4..b7fd48fa39 100644 --- a/docs/reference/commands.md +++ b/docs/reference/commands.md @@ -897,6 +897,7 @@ Examples: garden dev --hot=foo-service,bar-service # enable hot reloading for foo-service and bar-service garden dev --hot=* # enable hot reloading for all compatible services garden dev --skip-tests= # skip running any tests + garden dev --force # force redeploy of services when the command starts garden dev --name integ # run all tests with the name 'integ' in the project garden test --name integ* # run all tests with the name starting with 'integ' in the project @@ -918,6 +919,7 @@ Examples: | Argument | Alias | Type | Description | | -------- | ----- | ---- | ----------- | + | `--force` | | boolean | Force redeploy of service(s). | `--hot-reload` | `-hot` | array:string | The name(s) of the service(s) to deploy with hot reloading enabled. Use comma as a separator to specify multiple services. Use * to deploy all services with hot reloading enabled (ignores services belonging to modules that don't support or haven't configured hot reloading). | `--skip-tests` | | boolean | Disable running the tests. | `--test-names` | `-tn` | array:string | Filter the tests to run by test name across all modules (leave unset to run all tests). Accepts glob patterns (e.g. integ* would run both 'integ' and 'integration').