From be7e3611e839b386c4cc3fbed1ad62e54edff250 Mon Sep 17 00:00:00 2001 From: Szabolcs Toth <54896607+tothszabi@users.noreply.github.com> Date: Thu, 7 Nov 2024 00:40:18 +0100 Subject: [PATCH] [Bitrise] Add status reporting configuration and graph pipeline support (#4197) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add status_report_name to app, workflows and pipelines * Fix status name regex pattern * Fix status name regex pattern * BitriseDataModel requirements * Add graph pipeline support * Update formatting --------- Co-authored-by: Krisztián Gödrei --- src/schemas/json/bitrise.json | 57 ++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/src/schemas/json/bitrise.json b/src/schemas/json/bitrise.json index 270ead03ba3..4f190227450 100644 --- a/src/schemas/json/bitrise.json +++ b/src/schemas/json/bitrise.json @@ -14,6 +14,9 @@ "description": { "type": "string" }, + "status_report_name": { + "$ref": "#/definitions/StatusReportNameModel" + }, "envs": { "$ref": "#/definitions/EnvModel" } @@ -43,7 +46,7 @@ "type": "object" }, "BitriseDataModel": { - "oneOf": [ + "anyOf": [ { "required": ["format_version"] }, { "required": ["includes"] } ], @@ -262,6 +265,9 @@ "triggers": { "$ref": "#/definitions/TriggersModel" }, + "status_report_name": { + "$ref": "#/definitions/StatusReportNameModel" + }, "stages": { "items": { "patternProperties": { @@ -272,6 +278,46 @@ "type": "object" }, "type": "array" + }, + "workflows": { + "patternProperties": { + ".*": { + "$ref": "#/definitions/GraphPipelineWorkflowModel" + } + }, + "type": "object" + } + }, + "additionalProperties": false, + "type": "object" + }, + "GraphPipelineWorkflowModel": { + "properties": { + "depends_on": { + "items": { + "type": "string" + }, + "type": "array" + }, + "abort_on_fail": { + "type": "boolean" + }, + "should_always_run": { + "type": "string", + "enum": ["off", "workflow"] + }, + "run_if": { + "$ref": "#/definitions/GraphPipelineWorkflowRunIfModel" + } + }, + "additionalProperties": false, + "type": "object" + }, + "GraphPipelineWorkflowRunIfModel": { + "required": ["expression"], + "properties": { + "expression": { + "type": "string" } }, "additionalProperties": false, @@ -309,6 +355,12 @@ "additionalProperties": false, "type": "object" }, + "StatusReportNameModel": { + "type": "string", + "minLength": 1, + "maxLength": 100, + "pattern": "^[a-zA-Z0-9,./():\\-_ <>\\[\\]\\|]*$" + }, "StepModel": { "properties": { "title": { @@ -684,6 +736,9 @@ "triggers": { "$ref": "#/definitions/TriggersModel" }, + "status_report_name": { + "$ref": "#/definitions/StatusReportNameModel" + }, "before_run": { "items": { "type": "string"