From 30b026b4e0f7d396874f7be34602ee5db8384881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BChler?= Date: Tue, 17 Sep 2019 14:10:52 +0200 Subject: [PATCH] fix: login for ci mode in cleanup --- src/commands/cleanup/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/commands/cleanup/index.ts b/src/commands/cleanup/index.ts index 6559fb5..a32914a 100644 --- a/src/commands/cleanup/index.ts +++ b/src/commands/cleanup/index.ts @@ -1,4 +1,5 @@ import { Arguments, Argv, CommandModule } from 'yargs'; +import { kubeConfigCommand } from '../kube-config'; import { RootArguments } from '../../root-arguments'; import { exec } from '../../utils/exec'; import { Logger } from '../../utils/logger'; @@ -100,6 +101,14 @@ export const cleanupCommand: CommandModule = { )} names ${args.names.join(', ')}.`, ); logger.info('Cleanup resources from the namespace.'); + + if(args.ci) { + await kubeConfigCommand.handler({ + ...args, + noInteraction: true, + force: true, + }); + } const resources = (await exec( `kubectl ${RcFile.getKubectlArguments(args, []).join(' ')} get ${args.resources.join(