Skip to content

Commit

Permalink
fix: login for ci mode in cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
buehler authored Sep 17, 2019
1 parent 2bec1a7 commit 30b026b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/commands/cleanup/index.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -100,6 +101,14 @@ export const cleanupCommand: CommandModule<RootArguments, CleanupArguments> = {
)} 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(
Expand Down

0 comments on commit 30b026b

Please sign in to comment.