Skip to content

ExecutionCommand schema

{
    "$schema": "https://json-schema.org/draft/2019-09/schema#",
    "title": "JSON SCHEMA for ExecutionCommand manifests",
    "type": "object",
    "properties": {
        "apiVersion": {
            "const": "opentestfactory.org/v1beta1"
        },
        "kind": {
            "const": "ExecutionCommand"
        },
        "metadata": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                },
                "workflow_id": {
                    "type": "string"
                },
                "job_id": {
                    "type": "string"
                },
                "job_origin": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "step_id": {
                    "type": "string"
                },
                "step_origin": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "step_origin_status": {
                    "type": "object",
                    "patternProperties": {
                        "^[a-zA-Z0-9-]+$": {
                            "type": "number"
                        }
                    }
                },
                "step_sequence_id": {
                    "type": "number"
                },
                "labels": {
                    "type": "object",
                    "patternProperties": {
                        "^([a-zA-Z0-9-.]+/)?[a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?$": {
                            "type": "string"
                        }
                    },
                    "minProperties": 1,
                    "additionalProperties": false
                }
            },
            "additionalProperties": true,
            "required": [
                "name",
                "workflow_id",
                "job_id",
                "job_origin",
                "step_sequence_id"
            ]
        },
        "runs-on": {
            "$ref": "#/definitions/runs-on"
        },
        "scripts": {
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "shell": {
            "type": "string"
        },
        "variables": {
            "$ref": "#/definitions/variables"
        },
        "working-directory": {
            "type": "string"
        }
    },
    "required": [
        "apiVersion",
        "kind",
        "metadata",
        "runs-on",
        "scripts"
    ],
    "additionalProperties": false,
    "definitions": {
        "runs-on": {
            "anyOf": [
                {
                    "type": "string",
                    "pattern": "^[a-zA-Z][a-zA-Z0-9-]*$"
                },
                {
                    "type": "array",
                    "items": {
                        "type": "string",
                        "pattern": "^[a-zA-Z][a-zA-Z0-9-]*$"
                    },
                    "minItems": 1
                }
            ]
        },
        "variables": {
            "type": "object",
            "patternProperties": {
                "^[a-zA-Z0-9_]+$": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "properties": {
                                "value": {
                                    "type": "string"
                                },
                                "verbatim": {
                                    "type": "boolean"
                                }
                            },
                            "required": [
                                "value"
                            ],
                            "additionalProperties": false
                        }
                    ]
                }
            },
            "minProperties": 1
        }
    }
}