summaryrefslogtreecommitdiff
path: root/model/job.ts
diff options
context:
space:
mode:
authorElizabeth Alexander Hunt <me@liz.coffee>2025-05-10 16:57:03 -0700
committerElizabeth Alexander Hunt <me@liz.coffee>2025-05-10 16:57:03 -0700
commitfa8f3f9465e87d499f7d6428323f496a884b7818 (patch)
treeab477dfa52ef30282029c4f136bf605cb24d67a9 /model/job.ts
downloadci-fa8f3f9465e87d499f7d6428323f496a884b7818.tar.gz
ci-fa8f3f9465e87d499f7d6428323f496a884b7818.zip
initial commit
Diffstat (limited to 'model/job.ts')
-rw-r--r--model/job.ts41
1 files changed, 41 insertions, 0 deletions
diff --git a/model/job.ts b/model/job.ts
new file mode 100644
index 0000000..96e0959
--- /dev/null
+++ b/model/job.ts
@@ -0,0 +1,41 @@
+export type JobArgT = Record<string, string>;
+export interface Job {
+ readonly type: string;
+ readonly arguments: JobArgT;
+}
+
+export interface FetchCodeJobProps extends JobArgT {
+ readonly remoteUrl: string;
+ readonly checkout: string;
+ readonly path: string;
+}
+
+export interface FetchCodeJob {
+ readonly type: "fetch_code";
+ 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";
+ readonly arguments: BuildDockerImageJobProps;
+}
+
+export interface AnsiblePlaybookJobProps extends JobArgT {
+ readonly playbooks: string;
+}
+
+export interface AnsiblePlaybookJob extends Job {
+ readonly type: "ansible_playbook";
+ readonly arguments: AnsiblePlaybookJobProps;
+}