diff --git a/garden-service/src/plugins/kubernetes/helm/build.ts b/garden-service/src/plugins/kubernetes/helm/build.ts index 35ede64f7b..83d9d32c73 100644 --- a/garden-service/src/plugins/kubernetes/helm/build.ts +++ b/garden-service/src/plugins/kubernetes/helm/build.ts @@ -7,8 +7,10 @@ */ import { HelmModule } from "./config" -import { containsSource, getChartPath, getGardenValuesPath, getBaseModule } from "./common" +import { containsBuildSource, getChartPath, getGardenValuesPath, getBaseModule } from "./common" import { helm } from "./helm-cli" +import { ConfigurationError } from "../../../exceptions" +import { deline } from "../../../util/string" import { dumpYaml } from "../../../util/util" import { LogEntry } from "../../../logger/log-entry" import { getNamespace } from "../namespace" @@ -26,7 +28,14 @@ export async function buildHelmModule({ ctx, module, log }: BuildModuleParams): Promise> { - const { base, chart, dependencies, serviceResource, skipDeploy, tasks, tests } = moduleConfig.spec + const { base, dependencies, serviceResource, skipDeploy, tasks, tests } = moduleConfig.spec const sourceModuleName = serviceResource ? serviceResource.containerModule : undefined @@ -292,14 +292,6 @@ export async function configureHelmModule({ const containsSources = await containsSource(moduleConfig) - if (!chart && !base && !containsSources) { - throw new ConfigurationError( - deline`Module '${moduleConfig.name}' neither specifies a chart name, base module, - nor contains chart sources at \`chartPath\`.`, - { moduleConfig } - ) - } - // Make sure referenced modules are included as build dependencies // (This happens automatically for the service source module). function addBuildDependency(name: string, copy?: FileCopySpec[]) { diff --git a/garden-service/src/tasks/build.ts b/garden-service/src/tasks/build.ts index 36c82612ae..33d2a6e3ee 100644 --- a/garden-service/src/tasks/build.ts +++ b/garden-service/src/tasks/build.ts @@ -154,6 +154,9 @@ export class BuildTask extends BaseTask { log.setState(`Building version ${module.version.versionString}...`) } + const graph = await this.garden.getConfigGraph(log) + await this.garden.buildDir.syncDependencyProducts(this.module, graph, log) + let result: BuildResult try { result = await actions.build({ diff --git a/garden-service/src/tasks/stage-build.ts b/garden-service/src/tasks/stage-build.ts index baaac2f975..6aa861b323 100644 --- a/garden-service/src/tasks/stage-build.ts +++ b/garden-service/src/tasks/stage-build.ts @@ -65,9 +65,7 @@ export class StageBuildTask extends BaseTask { }) } - const graph = await this.garden.getConfigGraph(log || this.log) await this.garden.buildDir.syncFromSrc(this.module, log || this.log) - await this.garden.buildDir.syncDependencyProducts(this.module, graph, log || this.log) if (log) { log.setSuccess({