diff --git a/v0/template.json b/v0/template.json index 8c24c61da..18c5d9a1e 100644 --- a/v0/template.json +++ b/v0/template.json @@ -23,6 +23,8 @@ "$ref" : "#/definitions/template/workspace/template" }, { "$ref" : "#/definitions/template/notification/template" + }, { + "$ref" : "#/definitions/template/aiworkflow/template" } ] } }, @@ -1348,6 +1350,92 @@ } } } + }, + "aiworkflow" : { + "template" : { + "type" : "object", + "title" : "template", + "required" : [ "identifier", "name", "type", "versionLabel", "spec" ], + "properties" : { + "identifier" : { + "type" : "string", + "pattern" : "^[a-zA-Z_][0-9a-zA-Z_]{0,127}$" + }, + "name" : { + "type" : "string", + "pattern" : "^[a-zA-Z_0-9-.][-0-9a-zA-Z_\\s.]{0,127}$" + }, + "type" : { + "type" : "string", + "enum" : [ "AIWorkflow" ] + }, + "versionLabel" : { + "type" : "string", + "pattern" : "^[0-9a-zA-Z][^\\s/&]{0,127}$" + }, + "spec" : { + "oneOf" : [ { + "$ref" : "#/definitions/template/aiworkflow/notificationSpec" + } ] + }, + "tags" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + } + } + }, + "notificationSpec" : { + "title" : "notificationSpec", + "type" : "object", + "required" : [ "model", "serverUrl", "registryAuthServer", "clientIdRef", "clientSecretRef", "appSlug" ], + "properties" : { + "model" : { + "type" : "string" + }, + "serverUrl" : { + "type" : "string" + }, + "registryAuthServer" : { + "type" : "string" + }, + "clientIdRef" : { + "type" : "string" + }, + "clientSecretRef" : { + "type" : "string" + }, + "appSlug" : { + "type" : "string" + }, + "body" : { + "$ref" : "#/definitions/template/aiworkflow/aiWorkflowBody" + }, + "variables" : { + "type" : "array", + "items" : { + "oneOf" : [ { + "$ref" : "#/definitions/pipeline/common/NumberNGVariable" + }, { + "$ref" : "#/definitions/pipeline/common/SecretNGVariable" + }, { + "$ref" : "#/definitions/pipeline/common/StringNGVariable" + } ] + } + } + } + }, + "aiWorkflowBody" : { + "title" : "aiWorkflowBody", + "type" : "object", + "required" : [ "history" ], + "properties" : { + "history" : { + "type" : "string" + } + } + } } }, "pipeline" : { diff --git a/v0/template/aiworkflow/aiworkflow_spec.yaml b/v0/template/aiworkflow/aiworkflow_spec.yaml new file mode 100644 index 000000000..598779ebb --- /dev/null +++ b/v0/template/aiworkflow/aiworkflow_spec.yaml @@ -0,0 +1,31 @@ +title: notificationSpec +type: object +required: + - model + - serverUrl + - registryAuthServer + - clientIdRef + - clientSecretRef + - appSlug +properties: + model: + type: string + serverUrl: + type: string + registryAuthServer: + type: string + clientIdRef: + type: string + clientSecretRef: + type: string + appSlug: + type: string + body: + "$ref": "./aiworkflow_template_body.yaml" + variables: + type: array + items: + oneOf: + - $ref: ../../pipeline/common/number-ng-variable.yaml + - $ref: ../../pipeline/common/secret-ng-variable.yaml + - $ref: ../../pipeline/common/string-ng-variable.yaml diff --git a/v0/template/aiworkflow/aiworkflow_template_body.yaml b/v0/template/aiworkflow/aiworkflow_template_body.yaml new file mode 100644 index 000000000..afa9c6534 --- /dev/null +++ b/v0/template/aiworkflow/aiworkflow_template_body.yaml @@ -0,0 +1,7 @@ +title: aiWorkflowBody +type: object +required: + - history +properties: + history: + type: string \ No newline at end of file diff --git a/v0/template/aiworkflow/template.yaml b/v0/template/aiworkflow/template.yaml new file mode 100644 index 000000000..fd08f0c1b --- /dev/null +++ b/v0/template/aiworkflow/template.yaml @@ -0,0 +1,29 @@ +type: object +title: template +required: + - identifier + - name + - type + - versionLabel + - spec +properties: + identifier: + type: string + pattern: "^[a-zA-Z_][0-9a-zA-Z_]{0,127}$" + name: + type: string + pattern: "^[a-zA-Z_0-9-.][-0-9a-zA-Z_\\s.]{0,127}$" + type: + type: string + enum: + - AIWorkflow + versionLabel: + type: string + pattern: "^[0-9a-zA-Z][^\\s/&]{0,127}$" + spec: + oneOf: + - "$ref" : ./aiworkflow_spec.yaml + tags: + type: object + additionalProperties: + type: string diff --git a/v0/template/template_config.yaml b/v0/template/template_config.yaml index 12ac93cf2..b7e6ca432 100644 --- a/v0/template/template_config.yaml +++ b/v0/template/template_config.yaml @@ -9,6 +9,7 @@ template_types: - ./customdeployment/template.yaml - ./workspace/template.yaml - ./notification/template.yaml + - ./aiworkflow/template.yaml step_template_types: - ../pipeline/steps/cd/asg-blue-green-deploy-step-node.yaml