Skip to content

Commit

Permalink
fix(k8s): ensure project namespace exists ahead of kaniko build
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald authored and thsig committed Jun 1, 2021
1 parent 113c19e commit a1c9c67
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/plugins/kubernetes/container/build/kaniko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { KubernetesProvider, KubernetesPluginContext, DEFAULT_KANIKO_IMAGE } fro
import { BuildError, ConfigurationError } from "../../../../exceptions"
import { PodRunner } from "../../run"
import { Writable } from "stream"
import { getNamespaceStatus, getSystemNamespace } from "../../namespace"
import { ensureNamespace, getNamespaceStatus, getSystemNamespace } from "../../namespace"
import { dedent } from "../../../../util/string"
import { RunResult } from "../../../../types/plugin/base"
import { PluginContext } from "../../../../plugin-context"
Expand Down Expand Up @@ -151,6 +151,8 @@ export const kanikoBuild: BuildHandler = async (params) => {
authSecret = secretRes.authSecret
}

await ensureNamespace(api, { name: kanikoNamespace }, log)

// Execute the build
const args = [
"--context",
Expand Down

0 comments on commit a1c9c67

Please sign in to comment.