From 79cf006056e03a94c1549531532bd7cb47e0cad8 Mon Sep 17 00:00:00 2001 From: Thorsten Ball Date: Tue, 21 Apr 2020 10:10:35 +0200 Subject: [PATCH 1/2] Add cacheDirs to action definition JSON schema --- schema/action_stringdata.go | 10 +++++++++- schema/actions.schema.json | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/schema/action_stringdata.go b/schema/action_stringdata.go index 734bce0cf9..63f379f140 100644 --- a/schema/action_stringdata.go +++ b/schema/action_stringdata.go @@ -41,7 +41,7 @@ const ActionSchemaJSON = `{ "enum": ["command", "docker"] }, "args": { - "description": "The command to execute.", + "description": "The command and its argument to execute if \"type\" is \"command\", or a list of arguments to be passed to the Docker container if \"type\" is \"docker\".", "type": "array", "minItems": 1, "items": { @@ -52,6 +52,14 @@ const ActionSchemaJSON = `{ "description": "The Docker image handle for running the container executing this step. Just like when running ` + "`" + `docker run` + "`" + `, ` + "`" + `args` + "`" + ` here override the default ` + "`" + `CMD` + "`" + ` to be executed.", "type": "string", "minLength": 1 + }, + "cacheDirs": { + "description": "Names of directories to create for in a temporary location and mount into each \"docker\" step container under the specified name.", + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } } }, "oneOf": [ diff --git a/schema/actions.schema.json b/schema/actions.schema.json index 128734ea75..2d70e4bbb2 100644 --- a/schema/actions.schema.json +++ b/schema/actions.schema.json @@ -36,7 +36,7 @@ "enum": ["command", "docker"] }, "args": { - "description": "The command to execute.", + "description": "The command and its argument to execute if \"type\" is \"command\", or a list of arguments to be passed to the Docker container if \"type\" is \"docker\".", "type": "array", "minItems": 1, "items": { @@ -47,6 +47,14 @@ "description": "The Docker image handle for running the container executing this step. Just like when running `docker run`, `args` here override the default `CMD` to be executed.", "type": "string", "minLength": 1 + }, + "cacheDirs": { + "description": "Names of directories to create for in a temporary location and mount into each \"docker\" step container under the specified name.", + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } } }, "oneOf": [ From c5330c00f5184e958f72be382d2c9ff3ae1eec58 Mon Sep 17 00:00:00 2001 From: Thorsten Ball Date: Tue, 21 Apr 2020 10:42:01 +0200 Subject: [PATCH 2/2] Incorporate feedback --- schema/action_stringdata.go | 3 +-- schema/actions.schema.json | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/schema/action_stringdata.go b/schema/action_stringdata.go index 63f379f140..ee0f55d1ed 100644 --- a/schema/action_stringdata.go +++ b/schema/action_stringdata.go @@ -54,9 +54,8 @@ const ActionSchemaJSON = `{ "minLength": 1 }, "cacheDirs": { - "description": "Names of directories to create for in a temporary location and mount into each \"docker\" step container under the specified name.", + "description": "Names of directories to create in a temporary location and mount into each \"docker\" step container under the specified name.", "type": "array", - "minItems": 1, "items": { "type": "string" } diff --git a/schema/actions.schema.json b/schema/actions.schema.json index 2d70e4bbb2..4ba3401362 100644 --- a/schema/actions.schema.json +++ b/schema/actions.schema.json @@ -49,9 +49,8 @@ "minLength": 1 }, "cacheDirs": { - "description": "Names of directories to create for in a temporary location and mount into each \"docker\" step container under the specified name.", + "description": "Names of directories to create in a temporary location and mount into each \"docker\" step container under the specified name.", "type": "array", - "minItems": 1, "items": { "type": "string" }