diff --git a/core/src/actions/types.ts b/core/src/actions/types.ts index 2e7f6aadcd..e82087a80d 100644 --- a/core/src/actions/types.ts +++ b/core/src/actions/types.ts @@ -137,6 +137,11 @@ export interface ActionModes { local?: boolean } +export const ALL_ACTION_MODES_SUPPORTED: ActionModes = { + sync: true, + local: true, +} + export type ActionMode = keyof ActionModes | "default" export type ActionModeMap = { diff --git a/core/src/commands/deploy.ts b/core/src/commands/deploy.ts index a0a50186f4..0db79c314e 100644 --- a/core/src/commands/deploy.ts +++ b/core/src/commands/deploy.ts @@ -194,8 +194,8 @@ export class DeployCommand extends Command { const actionModes: ActionModeMap = { // Support a single empty value (which comes across as an empty list) as equivalent to '*' - local: opts["local-mode"]?.length === 0 ? ["*"] : opts["local-mode"]?.map((s) => "deploy." + s), - sync: opts.sync?.length === 0 ? ["*"] : opts.sync?.map((s) => "deploy." + s), + local: opts["local-mode"]?.length === 0 ? ["deploy.*"] : opts["local-mode"]?.map((s) => "deploy." + s), + sync: opts.sync?.length === 0 ? ["deploy.*"] : opts.sync?.map((s) => "deploy." + s), } const graph = await garden.getConfigGraph({ log, emit: true, actionModes }) diff --git a/core/src/config/template-contexts/actions.ts b/core/src/config/template-contexts/actions.ts index 0e4734b68d..ce6f03eb96 100644 --- a/core/src/config/template-contexts/actions.ts +++ b/core/src/config/template-contexts/actions.ts @@ -11,7 +11,7 @@ import type { ActionConfig, Action, ExecutedAction, ResolvedAction } from "../.. import type { ActionMode } from "../../actions/types.js" import type { Garden } from "../../garden.js" import type { GardenModule } from "../../types/module.js" -import { deline } from "../../util/string.js" +import { dedent, deline } from "../../util/string.js" import type { DeepPrimitiveMap, PrimitiveMap } from "../common.js" import { joi, joiIdentifier, joiIdentifierMap, joiPrimitive, joiVariables } from "../common.js" import type { ProviderMap } from "../provider.js" @@ -40,7 +40,11 @@ const actionModeSchema = joi .default("default") .allow("default", "sync", "local") .description( - "The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used." + dedent` + The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. + + Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + ` ) .example("sync") diff --git a/core/src/graph/actions.ts b/core/src/graph/actions.ts index bf1208c98d..c14a005bec 100644 --- a/core/src/graph/actions.ts +++ b/core/src/graph/actions.ts @@ -22,7 +22,7 @@ import type { Executed, Resolved, } from "../actions/types.js" -import { actionKinds } from "../actions/types.js" +import { ALL_ACTION_MODES_SUPPORTED, actionKinds } from "../actions/types.js" import { actionReferenceToString, addActionDependency, @@ -59,7 +59,7 @@ import { mergeVariables } from "./common.js" import type { ConfigGraph } from "./config-graph.js" import { MutableConfigGraph } from "./config-graph.js" import type { ModuleGraph } from "./modules.js" -import type { MaybeUndefined } from "../util/util.js" +import { isTruthy, type MaybeUndefined } from "../util/util.js" import minimatch from "minimatch" import type { ConfigContext } from "../config/template-contexts/base.js" import type { LinkedSource, LinkedSourceMap } from "../config-store/local.js" @@ -138,19 +138,74 @@ export const actionConfigsToGraph = profileAsync(async function actionConfigsToG // Doing this in two steps makes the code a bit less readable, but it's worth it for the performance boost. const preprocessResults: { [key: string]: PreprocessActionResult } = {} const computedActionModes: { [key: string]: { mode: ActionMode; explicitMode: boolean } } = {} - await Promise.all( - Object.entries(configsByKey).map(async ([key, config]) => { - const { mode, explicitMode } = getActionMode(config, actionModes, log) - computedActionModes[key] = { mode, explicitMode } - preprocessResults[key] = await preprocessActionConfig({ - garden, - config, - router, - log, - mode, + + const preprocessActions = async (predicate: (config: ActionConfig) => boolean = () => true) => { + return await Promise.all( + Object.entries(configsByKey).map(async ([key, config]) => { + if (!predicate(config)) { + return + } + + const { mode, explicitMode } = getActionMode(config, actionModes, log) + computedActionModes[key] = { mode, explicitMode } + preprocessResults[key] = await preprocessActionConfig({ + garden, + config, + router, + log, + mode, + }) }) - }) - ) + ) + } + + // First preprocess only the Deploy actions, so we can infer the mode of Build actions that are used by them. + await preprocessActions((config) => config.kind === "Deploy") + + // This enables users to use `this.mode` in Build action configs, such that `this.mode == "sync"` + // when a Deploy action that uses the Build action is in sync mode. + // + // The proper solution to this would involve e.g. parametrized actions, or injecting a separate Build action + // with `this.mode` set to the Deploy action's mode before resolution (both would need to be thought out carefully). + const actionTypes = await garden.getActionTypes() + const buildModeOverrides: Record = {} + for (const [key, res] of Object.entries(preprocessResults)) { + const config = res.config + const { mode } = computedActionModes[key] + if (config.kind === "Deploy" && mode !== "default") { + const definition = actionTypes[config.kind][config.type]?.spec + const buildDeps = dependenciesFromActionConfig( + log, + config, + configsByKey, + definition, + res.templateContext, + actionTypes + ) + const referencedBuildNames = [config.build, ...buildDeps.map((d) => d.name)].filter(isTruthy) + for (const buildName of referencedBuildNames) { + const buildKey = actionReferenceToString({ kind: "Build", name: buildName }) + if (buildModeOverrides[buildKey]) { + const prev = buildModeOverrides[buildKey] + log.warn(dedent` + Using mode ${styles.highlight(prev.mode)} for Build ${styles.highlight(buildName)} as requested by\ + the Deploy ${styles.highlight(prev.overriddenByDeploy)}. + + Ignoring request by Deploy ${styles.highlight(config.name)} to use mode ${styles.highlight(mode)}. + `) + } + actionModes[mode] = [buildKey, ...(actionModes[mode] || [])] + buildModeOverrides[buildKey] = { + mode, + overriddenByDeploy: config.name, + } + } + } + } + + // Preprocess all remaining actions (Deploy actions are preprocessed above) + // We are preprocessing actions in two batches so we can infer the mode of Build actions that are used by Deploy actions. See the comments above. + await preprocessActions((config) => config.kind !== "Deploy") // Optimize file scanning by avoiding unnecessarily broad scans when project is not in repo root. const preprocessedConfigs = Object.values(preprocessResults).map((r) => r.config) @@ -714,7 +769,13 @@ export const preprocessActionConfig = profileAsync(async function preprocessActi resolveTemplates() - const { config: updatedConfig, supportedModes } = await router.configureAction({ config, log }) + const configureActionResult = await router.configureAction({ config, log }) + + const { config: updatedConfig } = configureActionResult + + // NOTE: Build actions inherit the supported modes of the Deploy actions that use them + const supportedModes: ActionModes = + config.kind === "Build" ? ALL_ACTION_MODES_SUPPORTED : configureActionResult.supportedModes // -> Throw if trying to modify no-template fields for (const field of noTemplateFields) { diff --git a/core/test/unit/src/actions/action-configs-to-graph.ts b/core/test/unit/src/actions/action-configs-to-graph.ts index 576e328eec..504123c633 100644 --- a/core/test/unit/src/actions/action-configs-to-graph.ts +++ b/core/test/unit/src/actions/action-configs-to-graph.ts @@ -840,6 +840,51 @@ describe("actionConfigsToGraph", () => { expect(action.mode()).to.equal("local") }) + it("deploy action mode overrides the mode of a dependency build action", async () => { + const graph = await actionConfigsToGraph({ + garden, + log, + groupConfigs: [], + configs: [ + { + kind: "Deploy", + type: "test", + name: "foo", + timeout: DEFAULT_DEPLOY_TIMEOUT_SEC, + variables: {}, + dependencies: [{ kind: "Build", name: "foo" }], + internal: { + basePath: tmpDir.path, + }, + spec: {}, + }, + { + kind: "Build", + type: "test", + name: "foo", + timeout: DEFAULT_DEPLOY_TIMEOUT_SEC, + variables: {}, + internal: { + basePath: tmpDir.path, + }, + spec: {}, + }, + ], + moduleGraph: new ModuleGraph([], {}), + linkedSources: {}, + actionModes: { + local: ["deploy.*"], + }, + environmentName: garden.environmentName, + }) + + const deploy = graph.getDeploy("foo") + expect(deploy.mode()).to.equal("local") + + const build = graph.getBuild("foo") + expect(build.mode()).to.equal("local") + }) + it("throws if an unknown action kind is given", async () => { await expectError( () => diff --git a/docs/reference/action-types/Build/container.md b/docs/reference/action-types/Build/container.md index 246e9ffb8d..d3e6cbae4c 100644 --- a/docs/reference/action-types/Build/container.md +++ b/docs/reference/action-types/Build/container.md @@ -410,6 +410,8 @@ my-variable: ${actions.build.my-build.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Build/exec.md b/docs/reference/action-types/Build/exec.md index 3239ef4612..c4587ca0bf 100644 --- a/docs/reference/action-types/Build/exec.md +++ b/docs/reference/action-types/Build/exec.md @@ -392,6 +392,8 @@ my-variable: ${actions.build.my-build.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Build/jib-container.md b/docs/reference/action-types/Build/jib-container.md index bbeff8887b..f5a18b91e5 100644 --- a/docs/reference/action-types/Build/jib-container.md +++ b/docs/reference/action-types/Build/jib-container.md @@ -569,6 +569,8 @@ my-variable: ${actions.build.my-build.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Deploy/configmap.md b/docs/reference/action-types/Deploy/configmap.md index d0ffef036d..0720c10d50 100644 --- a/docs/reference/action-types/Deploy/configmap.md +++ b/docs/reference/action-types/Deploy/configmap.md @@ -321,6 +321,8 @@ my-variable: ${actions.deploy.my-deploy.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Deploy/container.md b/docs/reference/action-types/Deploy/container.md index ae88702838..9b29acf0fc 100644 --- a/docs/reference/action-types/Deploy/container.md +++ b/docs/reference/action-types/Deploy/container.md @@ -1191,6 +1191,8 @@ my-variable: ${actions.deploy.my-deploy.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Deploy/exec.md b/docs/reference/action-types/Deploy/exec.md index 565441d37e..371b31698c 100644 --- a/docs/reference/action-types/Deploy/exec.md +++ b/docs/reference/action-types/Deploy/exec.md @@ -391,6 +391,8 @@ my-variable: ${actions.deploy.my-deploy.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Deploy/helm.md b/docs/reference/action-types/Deploy/helm.md index 43f3cc7ef2..4792637bef 100644 --- a/docs/reference/action-types/Deploy/helm.md +++ b/docs/reference/action-types/Deploy/helm.md @@ -1045,6 +1045,8 @@ my-variable: ${actions.deploy.my-deploy.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Deploy/kubernetes.md b/docs/reference/action-types/Deploy/kubernetes.md index ab7ee9225d..8d40e874d3 100644 --- a/docs/reference/action-types/Deploy/kubernetes.md +++ b/docs/reference/action-types/Deploy/kubernetes.md @@ -1082,6 +1082,8 @@ my-variable: ${actions.deploy.my-deploy.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Deploy/persistentvolumeclaim.md b/docs/reference/action-types/Deploy/persistentvolumeclaim.md index d2326e05a4..a82cf93da1 100644 --- a/docs/reference/action-types/Deploy/persistentvolumeclaim.md +++ b/docs/reference/action-types/Deploy/persistentvolumeclaim.md @@ -491,6 +491,8 @@ my-variable: ${actions.deploy.my-deploy.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Deploy/pulumi.md b/docs/reference/action-types/Deploy/pulumi.md index ccd3d90214..5d5610f3d7 100644 --- a/docs/reference/action-types/Deploy/pulumi.md +++ b/docs/reference/action-types/Deploy/pulumi.md @@ -467,6 +467,8 @@ my-variable: ${actions.deploy.my-deploy.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Deploy/terraform.md b/docs/reference/action-types/Deploy/terraform.md index 25cb663170..dca31b5f83 100644 --- a/docs/reference/action-types/Deploy/terraform.md +++ b/docs/reference/action-types/Deploy/terraform.md @@ -378,6 +378,8 @@ my-variable: ${actions.deploy.my-deploy.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Run/container.md b/docs/reference/action-types/Run/container.md index 2dd315fd68..2c68dea4c5 100644 --- a/docs/reference/action-types/Run/container.md +++ b/docs/reference/action-types/Run/container.md @@ -618,6 +618,8 @@ my-variable: ${actions.run.my-run.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Run/exec.md b/docs/reference/action-types/Run/exec.md index 9aa4552429..8b076701f1 100644 --- a/docs/reference/action-types/Run/exec.md +++ b/docs/reference/action-types/Run/exec.md @@ -371,6 +371,8 @@ my-variable: ${actions.run.my-run.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Run/helm-pod.md b/docs/reference/action-types/Run/helm-pod.md index 5dbdf58cc0..11020bb35a 100644 --- a/docs/reference/action-types/Run/helm-pod.md +++ b/docs/reference/action-types/Run/helm-pod.md @@ -642,6 +642,8 @@ my-variable: ${actions.run.my-run.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Run/kubernetes-exec.md b/docs/reference/action-types/Run/kubernetes-exec.md index 6400168036..58ee22ab7c 100644 --- a/docs/reference/action-types/Run/kubernetes-exec.md +++ b/docs/reference/action-types/Run/kubernetes-exec.md @@ -414,6 +414,8 @@ my-variable: ${actions.run.my-run.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Run/kubernetes-pod.md b/docs/reference/action-types/Run/kubernetes-pod.md index 5a13292413..e4f98b44a7 100644 --- a/docs/reference/action-types/Run/kubernetes-pod.md +++ b/docs/reference/action-types/Run/kubernetes-pod.md @@ -707,6 +707,8 @@ my-variable: ${actions.run.my-run.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Test/conftest-helm.md b/docs/reference/action-types/Test/conftest-helm.md index 8e82c9e8ea..7c164e19b4 100644 --- a/docs/reference/action-types/Test/conftest-helm.md +++ b/docs/reference/action-types/Test/conftest-helm.md @@ -368,6 +368,8 @@ my-variable: ${actions.test.my-test.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Test/conftest.md b/docs/reference/action-types/Test/conftest.md index 0f7d4efc31..e25cc3013c 100644 --- a/docs/reference/action-types/Test/conftest.md +++ b/docs/reference/action-types/Test/conftest.md @@ -356,6 +356,8 @@ my-variable: ${actions.test.my-test.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Test/container.md b/docs/reference/action-types/Test/container.md index d9cd59514a..f52b278931 100644 --- a/docs/reference/action-types/Test/container.md +++ b/docs/reference/action-types/Test/container.md @@ -608,6 +608,8 @@ my-variable: ${actions.test.my-test.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Test/exec.md b/docs/reference/action-types/Test/exec.md index 8a98c4d0fa..f20c00451d 100644 --- a/docs/reference/action-types/Test/exec.md +++ b/docs/reference/action-types/Test/exec.md @@ -371,6 +371,8 @@ my-variable: ${actions.test.my-test.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Test/hadolint.md b/docs/reference/action-types/Test/hadolint.md index ed6e79cc59..f610c4e0fb 100644 --- a/docs/reference/action-types/Test/hadolint.md +++ b/docs/reference/action-types/Test/hadolint.md @@ -315,6 +315,8 @@ my-variable: ${actions.test.my-test.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Test/helm-pod.md b/docs/reference/action-types/Test/helm-pod.md index 28430400c5..b456ce6fb9 100644 --- a/docs/reference/action-types/Test/helm-pod.md +++ b/docs/reference/action-types/Test/helm-pod.md @@ -642,6 +642,8 @@ my-variable: ${actions.test.my-test.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Test/kubernetes-exec.md b/docs/reference/action-types/Test/kubernetes-exec.md index 05c0d66ec4..3b43485572 100644 --- a/docs/reference/action-types/Test/kubernetes-exec.md +++ b/docs/reference/action-types/Test/kubernetes-exec.md @@ -414,6 +414,8 @@ my-variable: ${actions.test.my-test.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/action-types/Test/kubernetes-pod.md b/docs/reference/action-types/Test/kubernetes-pod.md index 83e9ad8e59..c62a8ca283 100644 --- a/docs/reference/action-types/Test/kubernetes-pod.md +++ b/docs/reference/action-types/Test/kubernetes-pod.md @@ -707,6 +707,8 @@ my-variable: ${actions.test.my-test.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/template-strings/action-all-fields.md b/docs/reference/template-strings/action-all-fields.md index 3d3b0d4cb5..998c7a7eb3 100644 --- a/docs/reference/template-strings/action-all-fields.md +++ b/docs/reference/template-strings/action-all-fields.md @@ -447,6 +447,8 @@ The name of the action. The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | diff --git a/docs/reference/template-strings/action-specs.md b/docs/reference/template-strings/action-specs.md index 6188616fb4..643bec0308 100644 --- a/docs/reference/template-strings/action-specs.md +++ b/docs/reference/template-strings/action-specs.md @@ -581,6 +581,8 @@ my-variable: ${runtime.build..sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | @@ -697,6 +699,8 @@ my-variable: ${runtime.deploy..sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | @@ -813,6 +817,8 @@ my-variable: ${runtime.run..sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | @@ -929,6 +935,8 @@ my-variable: ${runtime.test..sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | @@ -1045,6 +1053,8 @@ my-variable: ${runtime.services..sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | @@ -1161,6 +1171,8 @@ my-variable: ${runtime.tasks..sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | @@ -1285,6 +1297,8 @@ my-variable: ${actions.build..sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | @@ -1401,6 +1415,8 @@ my-variable: ${actions.deploy..sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | @@ -1517,6 +1533,8 @@ my-variable: ${actions.run..sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | @@ -1633,6 +1651,8 @@ my-variable: ${actions.test..sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | @@ -1749,6 +1769,8 @@ my-variable: ${actions.services..sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | @@ -1865,6 +1887,8 @@ my-variable: ${actions.tasks..sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` | @@ -2027,6 +2051,8 @@ my-variable: ${this.sourcePath} The mode that the action should be executed in (e.g. 'sync' or 'local' for Deploy actions). Set to 'default' if no special mode is being used. +Build actions inherit the mode from Deploy actions that depend on them. E.g. If a Deploy action is in 'sync' mode and depends on a Build action, the Build action will inherit the 'sync' mode setting from the Deploy action. This enables installing different tools that may be necessary for different development modes. + | Type | Default | | -------- | ----------- | | `string` | `"default"` |