Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {request, readEventSource} from '../auth-request.js'
interface DeployRequest {
commit?: string
discoFile?: string
noCache?: boolean
}

export interface DeployResponse {
Expand All @@ -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<void> {
Expand All @@ -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

Expand Down