diff options
Diffstat (limited to 'model/job.ts')
-rw-r--r-- | model/job.ts | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/model/job.ts b/model/job.ts deleted file mode 100644 index 187ed56..0000000 --- a/model/job.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { isObject } from "@emprespresso/pengueno"; - -export type JobArgT = Record<string, string>; -export interface Job { - readonly type: string; - readonly arguments: JobArgT; -} -export const isJob = (j: unknown): j is Job => - !!( - isObject(j) && - "arguments" in j && - isObject(j.arguments) && - "type" in j && - typeof j.type === "string" && - j - ); - -export interface FetchCodeJobProps extends JobArgT { - readonly remoteUrl: string; - readonly checkout: string; - readonly path: string; -} - -export interface FetchCodeJob { - readonly type: "fetch_code.ts"; - readonly arguments: FetchCodeJobProps; -} - -export interface BuildDockerImageJobProps extends JobArgT { - readonly registry: string; - readonly namespace: string; - readonly repository: string; - readonly imageTag: string; - - readonly context: string; - readonly dockerfile: string; - readonly buildTarget: string; -} - -export interface BuildDockerImageJob extends Job { - readonly type: "build_docker_image.ts"; - readonly arguments: BuildDockerImageJobProps; -} - -export interface AnsiblePlaybookJobProps extends JobArgT { - readonly path: string; - readonly playbooks: string; -} - -export interface AnsiblePlaybookJob extends Job { - readonly type: "ansible_playbook.ts"; - readonly arguments: AnsiblePlaybookJobProps; -} - -export interface CheckoutCiJobProps extends JobArgT { - readonly remote: string; - readonly refname: string; - readonly rev: string; - - readonly run: string; - readonly returnPath: string; -} - -export interface CheckoutCiJob extends Job { - readonly type: "checkout_ci.ts"; - readonly arguments: CheckoutCiJobProps; -} |