diff --git a/src/schemas/json/bitrise-step.json b/src/schemas/json/bitrise-step.json index b75f83ab454..9a53472d8aa 100644 --- a/src/schemas/json/bitrise-step.json +++ b/src/schemas/json/bitrise-step.json @@ -120,6 +120,38 @@ "additionalProperties": false, "type": "object" }, + "ContainerReferenceConfigModel": { + "type": "object", + "description": "Additional configuration for a container reference.", + "properties": { + "recreate": { + "type": "boolean", + "description": "If true, the current container instance is discarded and a fresh one is started for this Step." + } + }, + "additionalProperties": false + }, + "ContainerReferenceModel": { + "description": "A reference to a container. Can be specified as a container ID string or as an object with the container ID as the key and optional configuration as the value.", + "oneOf": [ + { + "type": "string", + "description": "The ID of the container as defined in the top-level `containers` map." + }, + { + "type": "object", + "description": "The container ID with optional configuration.", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ContainerReferenceConfigModel" + } + }, + "additionalProperties": false, + "minProperties": 1, + "maxProperties": 1 + } + ] + }, "StepModel": { "properties": { "title": { @@ -237,6 +269,17 @@ "type": "object", "description": "Additional metadata related to the Step." }, + "execution_container": { + "$ref": "#/definitions/ContainerReferenceModel", + "description": "The execution container for this Step. The Step runs inside the specified Docker container." + }, + "service_containers": { + "type": "array", + "description": "Service containers to run alongside this Step as background services.", + "items": { + "$ref": "#/definitions/ContainerReferenceModel" + } + }, "inputs": { "items": { "patternProperties": { diff --git a/src/schemas/json/bitrise.json b/src/schemas/json/bitrise.json index ba5fb45933b..261f966b2a9 100644 --- a/src/schemas/json/bitrise.json +++ b/src/schemas/json/bitrise.json @@ -154,6 +154,11 @@ "ContainerModel": { "required": ["image"], "properties": { + "type": { + "type": "string", + "enum": ["execution", "service"], + "description": "The type of the container. Use `execution` for containers that execute Steps, and `service` for background service containers." + }, "image": { "type": "string", "description": "The Docker image for the container, in `[REPOSITORY[:TAG]]` format." @@ -182,6 +187,38 @@ "additionalProperties": false, "type": "object" }, + "ContainerReferenceConfigModel": { + "type": "object", + "description": "Additional configuration for a container reference.", + "properties": { + "recreate": { + "type": "boolean", + "description": "If true, the current container instance is discarded and a fresh one is started for this Step." + } + }, + "additionalProperties": false + }, + "ContainerReferenceModel": { + "description": "A reference to a container. Can be specified as a container ID string or as an object with the container ID as the key and optional configuration as the value.", + "oneOf": [ + { + "type": "string", + "description": "The ID of the container as defined in the top-level `containers` map." + }, + { + "type": "object", + "description": "The container ID with optional configuration.", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ContainerReferenceConfigModel" + } + }, + "additionalProperties": false, + "minProperties": 1, + "maxProperties": 1 + } + ] + }, "DockerCredentialModel": { "required": ["username", "password"], "properties": { @@ -812,6 +849,17 @@ "$ref": "#/definitions/EnvModel", "description": "Inputs defined for the Step bundle: these are values that can be set when the Step bundle is added to a Workflow." }, + "execution_container": { + "$ref": "#/definitions/ContainerReferenceModel", + "description": "The default execution container for Steps in this bundle. Steps in the bundle inherit this container unless they define their own." + }, + "service_containers": { + "type": "array", + "description": "The default service containers for Steps in this bundle. Service containers accumulate additively through the hierarchy.", + "items": { + "$ref": "#/definitions/ContainerReferenceModel" + } + }, "steps": { "items": { "patternProperties": { @@ -848,6 +896,17 @@ }, "inputs": { "$ref": "#/definitions/EnvModel" + }, + "execution_container": { + "$ref": "#/definitions/ContainerReferenceModel", + "description": "Overrides the execution container for this bundle invocation." + }, + "service_containers": { + "type": "array", + "description": "Overrides the service containers for this bundle invocation.", + "items": { + "$ref": "#/definitions/ContainerReferenceModel" + } } }, "additionalProperties": false,