diff --git a/src/commands/deploy.ts b/src/commands/deploy.ts index 91d36ed..eaa8b15 100644 --- a/src/commands/deploy.ts +++ b/src/commands/deploy.ts @@ -7,6 +7,7 @@ import {request, readEventSource} from '../auth-request.js' interface DeployRequest { commit?: string discoFile?: string + noCache?: boolean } export interface DeployResponse { @@ -29,6 +30,7 @@ export default class Deploy extends Command { // TODO file seems to not work right now - re-test once daemon is fixed? file: Flags.string({required: false}), disco: Flags.string({required: false}), + 'no-cache': Flags.boolean({required: false, default: false, description: 'Build without using Docker cache'}), } public async run(): Promise { @@ -46,6 +48,10 @@ export default class Deploy extends Command { reqBody.discoFile = discoFile } + if (flags['no-cache']) { + reqBody.noCache = true + } + const res = await request({method: 'POST', url, body: reqBody, discoConfig, expectedStatuses: [201]}) const data = (await res.json()) as DeployResponse