UNPKG

@amazon-codecatalyst/blueprints.sam-serverless-application

Version:

This blueprint creates a project that leverages a serverless application model (SAM) to quickly create and deploy an API. You can choose Java, TypeScript, or Python as the programming language

213 lines (212 loc) 5.1 kB
{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "Workflow", "type": "object", "title": "Workflow", "description": "A workflow is an automated procedure that describes how to build, test, and deploy your code as part of a continuous integration and continuous delivery (CI/CD) system. ", "properties": { "Name": { "description": "The name of the workflow", "type": "string", "pattern": "^[A-Za-z0-9_-]+$", "minLength": 1, "maxLength": 100 }, "SchemaVersion": { "$ref": "#/definitions/SchemaVersion" }, "RunMode": { "$ref": "#/definitions/RunModes" }, "Triggers": { "description": "The triggers the workflow uses", "type": "array", "items": { "$ref": "#/definitions/Trigger" } }, "Actions": { "$ref": "#/definitions/Actions" }, "Compute": { "$ref": "#/definitions/WorkflowCompute" } }, "required": ["Name", "SchemaVersion", "Actions"], "additionalProperties": false, "definitions": { "SchemaVersion": { "anyOf": [ { "type": "string", "const": "1.0" }, { "type": "number", "const": 1.0 }, { "type": "string" } ] }, "RunModes": { "description": "The run mode the workflow uses", "type": "string", "default": "QUEUED", "enum": [ "PARALLEL", "QUEUED", "SUPERSEDED" ] }, "Actions": { "description": "The actions for the workflow", "type": "object", "patternProperties": { "^[A-Za-z0-9_-]+$": { "oneOf": [ { "$ref": "#/definitions/Action" }, { "$ref": "#/definitions/ActionGroup" } ] } }, "additionalProperties": false }, "ActionGroup": { "description": "An action group contains one or more actions.", "type": "object", "properties": { "DependsOn": { "$ref": "../interfaces/DependsOn.json" }, "Actions": { "description": "The actions in the group", "type": "object", "patternProperties": { "^[A-Za-z0-9_-]+$": { "$ref": "#/definitions/Action" } }, "additionalProperties": false } }, "additionalProperties": false }, "Action": { "description": "An action is the main building block of a workflow, and defines a logical unit of work to perform during a workflow run.", "type": "object", "oneOf": [ { "$ref": "../actions/Build.json" }, { "$ref": "../actions/GenericAction.json" }, { "$ref": "../actions/GitHubActionsRunner.json" }, { "$ref": "../actions/ManagedTest.json" } ] }, "Trigger": { "type": "object", "oneOf": [ { "$ref": "../triggers/Push.json" }, { "$ref": "../triggers/PullRequest.json" }, { "$ref": "../triggers/Schedule.json" } ] }, "WorkflowCompute": { "oneOf": [ { "$ref": "#/definitions/EC2Compute" }, { "$ref": "#/definitions/LambdaCompute" } ] }, "EC2Compute": { "type": "object", "properties": { "Type": { "type": "string", "enum": [ "EC2", "ec2" ] }, "Fleet": { "anyOf": [ { "type": "string", "description": "Provisioned fleet name", "minLength": 2, "maxLength": 128 }, { "type": "string", "description": "On-demand fleet", "enum": [ "Linux.x86-64.Large", "Linux.x86-64.XLarge", "Linux.x86-64.2XLarge", "Linux.Arm64.Large", "Linux.Arm64.XLarge", "Linux.Arm64.2XLarge", "Windows.x86-64.XLarge", "Windows.x86-64.2XLarge" ] } ] }, "SharedInstance": { "type": "string", "enum": [ "TRUE", "FALSE" ] } }, "additionalProperties": false, "required": ["Type"] }, "LambdaCompute": { "type": "object", "properties": { "Type": { "type": "string", "enum": [ "LAMBDA", "Lambda" ] }, "Fleet": { "type": "string", "description": "On-demand fleet", "enum": [ "Linux.x86-64.Large", "Linux.x86-64.XLarge", "Linux.Arm64.Large", "Linux.Arm64.XLarge" ] } }, "additionalProperties": false, "required": ["Type"] } } }