From 8f45d5e1bcc81e118f7da128a482de5ea7caf27e Mon Sep 17 00:00:00 2001 From: Simon Emms Date: Fri, 26 Jun 2026 13:44:54 +0000 Subject: [PATCH] feat: add pull policy to run.container tasks Signed-off-by: Simon Emms --- definitions.go | 8 +++++++- schema.json | 13 ++++++++++++- schema.yaml | 9 +++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/definitions.go b/definitions.go index 0156058..e4326ad 100644 --- a/definitions.go +++ b/definitions.go @@ -1010,7 +1010,7 @@ var runTaskDefinition = &jsonschema.Schema{ Title: "Container", Description: "The configuration of the container to run.", UnevaluatedProperties: falseSchema(), - Required: []string{"image"}, + Required: []string{"image", "pullPolicy"}, Properties: map[string]*jsonschema.Schema{ propArguments: { Type: typeArray, @@ -1043,6 +1043,12 @@ var runTaskDefinition = &jsonschema.Schema{ Title: "ContainerName", Description: "A runtime expression, if any, used to give specific name to the container.", }, + "pullPolicy": { + Type: typeString, + Title: "PullPolicy", + Description: "Pull policy for the container image", + Enum: []any{"always", "never", "ifNotPresent"}, + }, "volumes": { Type: typeObject, Title: "ContainerVolumes", diff --git a/schema.json b/schema.json index e8bace4..8bc006c 100644 --- a/schema.json +++ b/schema.json @@ -1182,6 +1182,16 @@ "title": "ContainerName", "description": "A runtime expression, if any, used to give specific name to the container." }, + "pullPolicy": { + "type": "string", + "title": "PullPolicy", + "description": "Pull policy for the container image", + "enum": [ + "always", + "never", + "ifNotPresent" + ] + }, "volumes": { "type": "object", "title": "ContainerVolumes", @@ -1191,7 +1201,8 @@ "title": "Container", "description": "The configuration of the container to run.", "required": [ - "image" + "image", + "pullPolicy" ], "unevaluatedProperties": false } diff --git a/schema.yaml b/schema.yaml index 1e37601..15944dc 100644 --- a/schema.yaml +++ b/schema.yaml @@ -772,12 +772,21 @@ $defs: name to the container. title: ContainerName type: string + pullPolicy: + description: Pull policy for the container image + enum: + - always + - never + - ifNotPresent + title: PullPolicy + type: string volumes: description: The container's volume mappings, if any. title: ContainerVolumes type: object required: - image + - pullPolicy title: Container type: object unevaluatedProperties: false