Skip to content

Instantly share code, notes, and snippets.

@markmelville
Created June 20, 2024 23:52
Show Gist options
  • Save markmelville/694ec4c9ba6eb7e9ff7e6dd686021334 to your computer and use it in GitHub Desktop.
Save markmelville/694ec4c9ba6eb7e9ff7e6dd686021334 to your computer and use it in GitHub Desktop.
{"type":"object","required":["environments","modules"],"properties":{"environments":{"type":"object","description":"List of environments that will be deployed to by any module or pipeline in the project. Include any smoke environments.","patternProperties":{"^[a-z_][a-z0-9_]+$":{"type":"object","required":["name","awsAccount"],"properties":{"name":{"type":"string","description":"A display name with no semantic meaning."},"awsAccount":{"type":"string","description":"The account alias of the AWS account."}}}},"required":[]},"modules":{"type":"object","patternProperties":{"^[a-z_][a-z0-9_]+$":{"type":"object","required":["name","path","pipelines"],"properties":{"name":{"type":"string","description":"A display name with no semantic meaning."},"description":{"type":"string","nullable":true},"repo":{"type":"string","description":"The repo where source files are found in format: GithubOrg/RepoName. Defaults to the stack's primary repo.","nullable":true},"path":{"type":"string","description":"The path within the repo, relative to the repository root"},"pipelines":{"type":"object","description":"Each property forms a pipeline ID, unique to the module, with format {module_id}_{pipeline_id}. Changing the ID re-creates the pipeline.","patternProperties":{"^[a-z_][a-z0-9_]+$":{"$ref":"#/definitions/pipeline"}},"required":[]}}}},"required":[]},"settings":{"$ref":"#/definitions/settings"}},"definitions":{"buildPipeline":{"type":"object","required":["name","type","spec"],"properties":{"name":{"type":"string","description":"A display name with no semantic meaning."},"type":{"type":"string","enum":["build"]},"spec":{"$ref":"#/definitions/buildPipelineSpec"}}},"deploymentPipeline":{"type":"object","required":["name","type","spec"],"properties":{"name":{"type":"string","description":"A display name with no semantic meaning."},"type":{"type":"string","enum":["deployment"]},"spec":{"$ref":"#/definitions/deploymentPipelineSpec"}}},"terraformPipeline":{"type":"object","required":["name","type","spec"],"properties":{"name":{"type":"string","description":"A display name with no semantic meaning."},"type":{"type":"string","enum":["terraform"]},"spec":{"$ref":"#/definitions/terraformPipelineSpec"}}},"weightedRoutingPipeline":{"type":"object","required":["name","type","spec"],"properties":{"name":{"type":"string","description":"A display name with no semantic meaning."},"type":{"type":"string","enum":["weighted_routing"]},"spec":{"$ref":"#/definitions/weightedRoutingPipelineSpec"}}},"pipeline":{"type":"object","properties":{"type":{"type":"string","enum":["build","deployment","terraform","weighted_routing"],"description":"The type of pipeline, one of: (build | deployment | terraform | weighted_routing). This value determines the schema for the spec."}},"allOf":[{"if":{"properties":{"type":{"enum":["build"]}}},"then":{"properties":{"spec":{"$ref":"#/definitions/buildPipelineSpec"}}}},{"if":{"properties":{"type":{"enum":["deployment"]}}},"then":{"properties":{"spec":{"$ref":"#/definitions/deploymentPipelineSpec"}}}},{"if":{"properties":{"type":{"enum":["terraform"]}}},"then":{"properties":{"spec":{"$ref":"#/definitions/terraformPipelineSpec"}}}},{"if":{"properties":{"type":{"enum":["weighted_routing"]}}},"then":{"properties":{"spec":{"$ref":"#/definitions/weightedRoutingPipelineSpec"}}}}],"anyOf":[{"$ref":"#/definitions/buildPipeline"},{"$ref":"#/definitions/deploymentPipeline"},{"$ref":"#/definitions/terraformPipeline"},{"$ref":"#/definitions/weightedRoutingPipeline"}]},"buildPipelineSpec":{"type":"object","required":[],"properties":{"path":{"type":"string","description":"The path to use relative to the module path. Defaults to the module path.","nullable":true},"architecture":{"type":"string","enum":["amd64","arm64"],"description":"The cpu architecture of the built image. Defaults to amd64.","nullable":true},"enableDockerInDocker":{"type":"boolean","description":"Enables the use of secondary docker containers in the build pipeline. Defaults to false.","nullable":true},"resources":{"type":"object","description":"The cpu and memory resources allocated to the build container.","required":["cpu","memory"],"properties":{"cpu":{"type":"string"},"memory":{"type":"string"}},"nullable":true},"variables":{"type":"object","patternProperties":{"^[A-Z_][A-Z0-9_]*$":{"type":"string"}},"required":[],"description":"Environment Variables that will be exposed to all command scripts. This is one way to get the value of Harness variables into scripts.","nullable":true},"commands":{"type":"array","description":"The list of build steps to run. Not required if all build steps are container in a multi-stage Dockerfile.","items":{"$ref":"#/definitions/command"},"nullable":true},"deepsourceConfig":{"type":"array","items":{"type":"object","required":["language","codeCoverageFiles"],"properties":{"language":{"type":"string"},"codeCoverageFiles":{"type":"array","items":{"type":"string"}}}},"nullable":true},"triggers":{"type":"array","description":"Events that will automatically execute the build pipleine.","items":{"$ref":"#/definitions/trigger"},"nullable":true},"artifact":{"type":"object","description":"Defines how to package deployment artifacts, and where they will be stored.","required":["type","spec"],"nullable":true,"properties":{"type":{"type":"string","enum":["docker"]},"spec":{"type":"object","required":["repoName"],"properties":{"context":{"type":"string","description":"Path relative to module path. Defaults to module path.","nullable":true},"dockerfile":{"type":"string","description":"Path to the Dockerfile relative to module path. Defaults to 'Dockerfile'.","nullable":true},"repoName":{"type":"string","description":"The name of one of the ECR repos created for the stack in the l1-builds account. Just the part after the stackID, e.g. 'release'"},"tags":{"type":"array","items":{"type":"string"},"description":"Tags that will be added to every image built from the default branch","nullable":true}}}}},"artifacts":{"type":"object","description":"Defines how to package deployment artifacts, and where they will be stored.","nullable":true,"properties":{"docker":{"type":"object","required":["repoName"],"nullable":true,"properties":{"context":{"type":"string","description":"Path relative to module path. Defaults to module path.","nullable":true},"dockerfile":{"type":"string","description":"Path to the Dockerfile relative to module path. Defaults to 'Dockerfile'.","nullable":true},"repoName":{"type":"string","description":"The name of one of the ECR repos created for the stack in the l1-builds account. Just the part after the stackID, e.g. 'release'"},"tags":{"type":"array","items":{"type":"string"},"description":"Tags that will be added to every image built from the default branch","nullable":true}}},"akamai":{"type":"object","required":["folder"],"nullable":true,"properties":{"folder":{"type":"string","description":"A folder name within Akamai. If a folder name is claimed by a stack, it cannot be used by another stack. Also, please do not include stack ID in the folder name."},"sourcePath":{"type":"string","description":"Path to the assets source relative to module path.","nullable":true}}}}}}},"commitTriggerSpec":{"type":"object","required":["branch"],"properties":{"branch":{"type":"string","description":"Name or pattern of committed branch. Supports wildcard '*' at beginning and/or end."},"condition":{"type":"object","description":"Allows the trigger to only fire based on a match to the files altered by the commits.","required":["type","value"],"properties":{"type":{"type":"string","enum":["Equals","NotEquals","In","NotIn","StartsWith","EndsWith","Contains","Regex"]},"value":{"type":"string"}},"nullable":true}}},"commitTrigger":{"type":"object","required":["name","enabled","type","spec"],"properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"enabled":{"type":"boolean"},"pushArtifact":{"type":"boolean","description":"Should the build pull the artifact? Doesn't apply if no artifact is defined. Defaults to true for type \"commit\" and false for types \"pr\" or \"cron\".","nullable":true},"triggerDeployment":{"type":"boolean","description":"Should the build trigger a deployment? Doesn't apply if there is no linked deployment. Defaults to true for type \"commit\" and false for type \"pr\" or \"cron\".","nullable":true},"type":{"type":"string","enum":["commit"]},"spec":{"type":"object","required":["branch"],"properties":{"branch":{"type":"string","description":"Name or pattern of committed branch. Supports wildcard '*' at beginning and/or end."},"condition":{"type":"object","description":"Allows the trigger to only fire based on a match to the files altered by the commits.","required":["type","value"],"properties":{"type":{"type":"string","enum":["Equals","NotEquals","In","NotIn","StartsWith","EndsWith","Contains","Regex"]},"value":{"type":"string"}},"nullable":true}}}}},"prTriggerSpec":{"type":"object","required":["targetBranch"],"properties":{"targetBranch":{"type":"string","description":"Name or pattern of targeted branch. Supports wildcard '*' at beginning and/or end."},"condition":{"type":"object","description":"Allows the trigger to only fire based on a match to the files altered by the commits.","required":["type","value"],"properties":{"type":{"type":"string","enum":["Equals","NotEquals","In","NotIn","StartsWith","EndsWith","Contains","Regex"]},"value":{"type":"string"}},"nullable":true}}},"prTrigger":{"type":"object","required":["name","enabled","type","spec"],"properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"enabled":{"type":"boolean"},"pushArtifact":{"type":"boolean","description":"Should the build pull the artifact? Doesn't apply if no artifact is defined. Defaults to true for type \"commit\" and false for types \"pr\" or \"cron\".","nullable":true},"triggerDeployment":{"type":"boolean","description":"Should the build trigger a deployment? Doesn't apply if there is no linked deployment. Defaults to true for type \"commit\" and false for type \"pr\" or \"cron\".","nullable":true},"type":{"type":"string","enum":["pr"]},"spec":{"type":"object","required":["targetBranch"],"properties":{"targetBranch":{"type":"string","description":"Name or pattern of targeted branch. Supports wildcard '*' at beginning and/or end."},"condition":{"type":"object","description":"Allows the trigger to only fire based on a match to the files altered by the commits.","required":["type","value"],"properties":{"type":{"type":"string","enum":["Equals","NotEquals","In","NotIn","StartsWith","EndsWith","Contains","Regex"]},"value":{"type":"string"}},"nullable":true}}}}},"cronTriggerSpec":{"type":"object","required":["branch","condition"],"properties":{"branch":{"type":"string"},"condition":{"type":"object","required":["type","value"],"properties":{"type":{"type":"string","enum":["UNIX","QUARTZ"],"description":"The type of Cron expression, UNIX or QUARTZ."},"value":{"type":"string","description":"The Cron expression, which will use UTC time. https://developer.harness.io/docs/platform/triggers/schedule-pipelines-using-cron-triggers/#schedule-the-trigger"}}}}},"cronTrigger":{"type":"object","required":["name","enabled","type","spec"],"properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"enabled":{"type":"boolean"},"pushArtifact":{"type":"boolean","description":"Should the build pull the artifact? Doesn't apply if no artifact is defined. Defaults to true for type \"commit\" and false for types \"pr\" or \"cron\".","nullable":true},"triggerDeployment":{"type":"boolean","description":"Should the build trigger a deployment? Doesn't apply if there is no linked deployment. Defaults to true for type \"commit\" and false for type \"pr\" or \"cron\".","nullable":true},"type":{"type":"string","enum":["cron"]},"spec":{"type":"object","required":["branch","condition"],"properties":{"branch":{"type":"string"},"condition":{"type":"object","required":["type","value"],"properties":{"type":{"type":"string","enum":["UNIX","QUARTZ"],"description":"The type of Cron expression, UNIX or QUARTZ."},"value":{"type":"string","description":"The Cron expression, which will use UTC time. https://developer.harness.io/docs/platform/triggers/schedule-pipelines-using-cron-triggers/#schedule-the-trigger"}}}}}}},"pipelineTriggerSpec":{"type":"object","required":["pipeline"],"properties":{"pipeline":{"type":"string","description":"The id of the pipeline that triggers this build upon successful completion. If the pipeline is in another module use the format 'module_id.pipeline_id'."}}},"pipelineTrigger":{"type":"object","required":["name","enabled","type","spec"],"properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"enabled":{"type":"boolean"},"pushArtifact":{"type":"boolean","description":"Should the build pull the artifact? Doesn't apply if no artifact is defined. Defaults to true for type \"commit\" and false for types \"pr\" or \"cron\".","nullable":true},"triggerDeployment":{"type":"boolean","description":"Should the build trigger a deployment? Doesn't apply if there is no linked deployment. Defaults to true for type \"commit\" and false for type \"pr\" or \"cron\".","nullable":true},"type":{"type":"string","enum":["pipeline"]},"spec":{"type":"object","required":["pipeline"],"properties":{"pipeline":{"type":"string","description":"The id of the pipeline that triggers this build upon successful completion. If the pipeline is in another module use the format 'module_id.pipeline_id'."}}}}},"trigger":{"type":"object","properties":{"type":{"type":"string","enum":["commit","pr","cron","pipeline"],"description":"The type of trigger. 'commit' for a push to a branch, 'pr' for an opened pull request, 'cron' for a schedule, and 'pipeline' for another pipeline."}},"oneOf":[{"$ref":"#/definitions/commitTrigger"},{"$ref":"#/definitions/prTrigger"},{"$ref":"#/definitions/cronTrigger"},{"$ref":"#/definitions/pipelineTrigger"}],"allOf":[{"if":{"properties":{"type":{"enum":["commit"]}}},"then":{"properties":{"spec":{"$ref":"#/definitions/commitTriggerSpec"}}}},{"if":{"properties":{"type":{"enum":["pr"]}}},"then":{"properties":{"spec":{"$ref":"#/definitions/prTriggerSpec"}}}},{"if":{"properties":{"type":{"enum":["cron"]}}},"then":{"properties":{"spec":{"$ref":"#/definitions/cronTriggerSpec"}}}},{"if":{"properties":{"type":{"enum":["pipeline"]}}},"then":{"properties":{"spec":{"$ref":"#/definitions/pipelineTriggerSpec"}}}}]},"buildCommandSpec":{"type":"object","required":["command"],"properties":{"command":{"type":"string"}}},"buildCommand":{"type":"object","required":["name","image","type","spec"],"properties":{"name":{"type":"string","description":"The name of the build step."},"image":{"type":"string","description":"The image used for the container. Value depends on 'imageSource'. 'build': 'nodejs/18', 'base': 'nodejs:18', 'account': 'some-stack-id/sharedTools', 'stack': 'repoName' (without stackId)"},"imageSource":{"type":"string","enum":["build","base","account","stack"],"description":"The source of the image. 'base' = an Ancestry Base Image. 'account' = an image in the l1-build account, so, images from other stacks. 'stack' = the stack's own images. Defaults to 'build' = images found here: https://github.ancestry.com/Ancestry/harness-build-images/blob/main/.harness/ecr-config.json","nullable":true},"runAsUser":{"type":"number","description":"The id of the user used to run the container.","nullable":true},"type":{"type":"string","enum":["build"]},"spec":{"$ref":"#/definitions/buildCommandSpec"}},"additionalProperties":true},"backgroundCommandSpec":{"type":"object","required":[],"properties":{"command":{"type":"string","description":"The command to use when running the container.","nullable":true},"entrypoint":{"type":"array","description":"The entrypoint to use when running the container.","items":{"type":"string"},"nullable":true}}},"backgroundCommand":{"type":"object","required":["name","image","type","spec"],"properties":{"name":{"type":"string","description":"The name of the build step."},"image":{"type":"string","description":"The image used for the container. Value depends on 'imageSource'. 'build': 'nodejs/18', 'base': 'nodejs:18', 'account': 'some-stack-id/sharedTools', 'stack': 'repoName' (without stackId)"},"imageSource":{"type":"string","enum":["build","base","account","stack"],"description":"The source of the image. 'base' = an Ancestry Base Image. 'account' = an image in the l1-build account, so, images from other stacks. 'stack' = the stack's own images. Defaults to 'build' = images found here: https://github.ancestry.com/Ancestry/harness-build-images/blob/main/.harness/ecr-config.json","nullable":true},"runAsUser":{"type":"number","description":"The id of the user used to run the container.","nullable":true},"type":{"type":"string","enum":["background"]},"spec":{"$ref":"#/definitions/backgroundCommandSpec"}},"additionalProperties":true},"testCommandSpec":{"type":"object","required":["language","buildTool","args","outputPattern"],"properties":{"language":{"type":"string"},"buildTool":{"type":"string"},"args":{"type":"string"},"outputPattern":{"type":"string"}}},"testCommand":{"type":"object","required":["name","image","type","spec"],"description":"This type of step will display test results in Harness, but it's not implemented: https://developer.harness.io/docs/continuous-integration/use-ci/run-tests/viewing-tests/","properties":{"name":{"type":"string","description":"The name of the build step."},"image":{"type":"string","description":"The image used for the container. Value depends on 'imageSource'. 'build': 'nodejs/18', 'base': 'nodejs:18', 'account': 'some-stack-id/sharedTools', 'stack': 'repoName' (without stackId)"},"imageSource":{"type":"string","enum":["build","base","account","stack"],"description":"The source of the image. 'base' = an Ancestry Base Image. 'account' = an image in the l1-build account, so, images from other stacks. 'stack' = the stack's own images. Defaults to 'build' = images found here: https://github.ancestry.com/Ancestry/harness-build-images/blob/main/.harness/ecr-config.json","nullable":true},"runAsUser":{"type":"number","description":"The id of the user used to run the container.","nullable":true},"type":{"type":"string","enum":["test"]},"spec":{"$ref":"#/definitions/testCommandSpec"}}},"command":{"type":"object","properties":{"type":{"type":"string","enum":["build","background","test"]}},"oneOf":[{"$ref":"#/definitions/buildCommand"},{"$ref":"#/definitions/testCommand"},{"$ref":"#/definitions/backgroundCommand"}],"allOf":[{"if":{"properties":{"type":{"enum":["build"]}}},"then":{"properties":{"spec":{"$ref":"#/definitions/buildCommandSpec"}}}},{"if":{"properties":{"type":{"enum":["background"]}}},"then":{"properties":{"spec":{"$ref":"#/definitions/backgroundCommandSpec"}}}},{"if":{"properties":{"type":{"enum":["test"]}}},"then":{"properties":{"spec":{"$ref":"#/definitions/testCommandSpec"}}}}]},"deploymentPipelineSpec":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["serverless","eks","ecs"],"description":"The type of deployment pipeline, one of: (eks | ecs | serverless). This value determines the schema for the spec."}},"allOf":[{"if":{"properties":{"type":{"enum":["serverless"]}}},"then":{"properties":{"spec":{"$ref":"#/definitions/serverlessDeploymentSpec"}}}},{"if":{"properties":{"type":{"enum":["eks"]}}},"then":{"properties":{"spec":{"$ref":"#/definitions/eksDeploymentSpec"},"environments":{"$ref":"#/definitions/eksEnvironments"}}}},{"if":{"properties":{"type":{"enum":["ecs"]}}},"then":{"properties":{"spec":{"$ref":"#/definitions/ecsDeploymentSpec"},"environments":{"$ref":"#/definitions/ecsEnvironments"}}}}],"oneOf":[{"$ref":"#/definitions/serverlessDeploymentPipelineSpec"},{"$ref":"#/definitions/eksDeploymentPipelineSpec"},{"$ref":"#/definitions/ecsDeploymentPipelineSpec"}]},"serverlessDeploymentPipelineSpec":{"type":"object","required":["type","buildPipeline","spec"],"properties":{"type":{"type":"string","enum":["serverless"]},"buildPipeline":{"type":"string","description":"The ID of the build pipeline (within the same module) that produces the artifact for this deployment (must produce a docker artifact)."},"architecture":{"type":"string","description":"Overrides the architecture of the referenced buildPipeline","enum":["arm64","amd64"],"nullable":true},"spec":{"$ref":"#/definitions/serverlessDeploymentSpec"}}},"eksDeploymentPipelineSpec":{"type":"object","required":["type","buildPipeline","spec"],"properties":{"type":{"type":"string","enum":["eks"]},"buildPipeline":{"type":"string","description":"The ID of the build pipeline (within the same module) that produces the artifact for this deployment (must produce a docker artifact)."},"architecture":{"type":"string","description":"Overrides the architecture of the referenced buildPipeline","enum":["arm64","amd64"],"nullable":true},"spec":{"$ref":"#/definitions/eksDeploymentSpec"}}},"ecsDeploymentPipelineSpec":{"type":"object","required":["type","buildPipeline","spec"],"properties":{"type":{"type":"string","enum":["ecs"]},"buildPipeline":{"type":"string","description":"The ID of the build pipeline (within the same module) that produces the artifact for this deployment (must produce a docker artifact)."},"architecture":{"type":"string","description":"Overrides the architecture of the referenced buildPipeline","enum":["arm64","amd64"],"nullable":true},"spec":{"$ref":"#/definitions/ecsDeploymentSpec"}}},"serverlessDeploymentSpec":{"type":"object","required":["manifest","environments"],"properties":{"manifest":{"type":"object","required":["path"],"properties":{"path":{"type":"string","description":"the directory containing the serverless.yml, relative to the module path"}}},"architecture":{"type":"string","enum":["amd64","arm64"],"nullable":true},"image":{"type":"string","nullable":true},"infrastructure":{"type":"object","nullable":true,"required":["runtimeIamRoleName"],"properties":{"runtimeIamRoleName":{"type":"string"},"securityGroupName":{"type":"string","nullable":true},"queues":{"type":"object","patternProperties":{"^[A-Z_][A-Z0-9_]*$":{"type":"string"}},"required":[],"nullable":true}}},"environmentDefaults":{"type":"object","nullable":true,"required":[],"properties":{"memorySize":{"type":"number","nullable":true},"timeout":{"type":"number","nullable":true}}},"variables":{"type":"object","patternProperties":{"^[A-Z_][A-Z0-9_]*$":{"type":"string"}},"required":[],"nullable":true},"serverlessFunctions":{"type":"object","nullable":true,"patternProperties":{"^[a-zA-Z0-9_-]+$":{"$ref":"#/definitions/serverlessFunctionSpec"}},"required":[]},"environments":{"$ref":"#/definitions/serverlessEnvironments"}}},"serverlessEnvironments":{"type":"object","description":"this is an ordered dictionary and will determine deploy order","patternProperties":{"^[a-z_][a-z0-9_]+$":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"enableApproval":{"type":"boolean","nullable":true},"enableCanary":{"type":"boolean","nullable":true},"enableSmoke":{"type":"boolean","nullable":true},"variables":{"type":"object","patternProperties":{"^[A-Z_][A-Z0-9_]*$":{"type":"string"}},"required":[],"nullable":true,"description":"Environment level variables to pass to Lambda."}}}},"required":[]},"serverlessFunctionSpec":{"type":"object","required":["image"],"properties":{"memorySize":{"type":"number","nullable":true},"image":{"type":"object","properties":{"name":{"type":"string"},"command":{"type":"array","items":{"type":"string"}}},"required":["name","command"]},"events":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["httpApi"],"properties":{"httpApi":{"oneOf":[{"type":"object","required":["method","path"],"properties":{"method":{"type":"string"},"path":{"type":"string"}}},{"type":"string"}]}}},{"type":"object","required":["schedule"],"properties":{"schedule":{"type":"object","required":["rate"],"properties":{"rate":{"type":"string"},"enabled":{"type":"string","nullable":true}}}}},{"type":"object","required":["alb"],"properties":{"alb":{"type":"object","required":["listenerArn","priority"],"properties":{"listenerArn":{"type":"string"},"priority":{"type":"number"},"conditions":{"type":"object","required":[],"properties":{"path":{"type":"string","nullable":true},"method":{"type":"array","items":{"type":"string"},"nullable":true}},"nullable":true}}}}},{"type":"object","required":["sqs"],"properties":{"sqs":{"type":"string"}}}]},"nullable":true}}},"eksPrimaryEnvironmentSpec":{"type":"object","required":[],"properties":{"replicas":{"type":"number","nullable":true},"scaling":{"type":"object","oneOf":[{"type":"object","required":["enabled","min","max"],"properties":{"enabled":{"type":"boolean","enum":[true]},"min":{"type":"number","minimum":0,"maximum":1000,"description":"The minimum number of instances that should be running."},"max":{"type":"number","minimum":0,"maximum":1000,"description":"The maximum number of instances that should be running."},"behavior":{"type":"object","required":["scaleDown","scaleUp"],"properties":{"scaleDown":{"type":"object","description":"Scale Cooldown time which defines times for scaling up and down","required":["cooldownSeconds"],"properties":{"cooldownSeconds":{"type":"number","description":"Time to scale up or down"}}},"scaleUp":{"type":"object","description":"Scale Cooldown time which defines times for scaling up and down","required":["cooldownSeconds"],"properties":{"cooldownSeconds":{"type":"number","description":"Time to scale up or down"}}}}},"scalars":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["requests","resource","sqs","metric"],"description":"The type of scalar, one of: (requests | resource | metric). This value determines the schema for the spec."}},"allOf":[{"if":{"properties":{"type":{"enum":["requests"]}}},"then":{"properties":{"spec":{"type":"object","description":"The 'requests' scalar is based on the number of requests/minute.","required":["targetPerInstance"],"properties":{"targetPerInstance":{"type":"number","minimum":0,"description":"The threshold for requests/minute per instance that will trigger scaling."}}}}}},{"if":{"properties":{"type":{"enum":["resource"]}}},"then":{"properties":{"spec":{"type":"object","description":"The 'resource' scalar is based on the percentage of a resource used.","required":["resourceName","targetPercentage"],"properties":{"resourceName":{"type":"string","enum":["cpu","memory"],"description":"The resource used by this scalar, one of: (cpu | memory)."},"targetPercentage":{"type":"number","minimum":0,"maximum":100,"description":"The threshold for percentage of this resource that will trigger scaling."}}}}}},{"if":{"properties":{"type":{"enum":["sqs"]}}},"then":{"properties":{"spec":{"type":"object","description":"Specification for an SQS (Simple Queue Service) scalar.","required":["queueLength","queueName"],"properties":{"queueLength":{"type":"string","description":"The length of the SQS queue as a string."},"queueName":{"type":"string","description":"The name of the SQS queue."}}}}}},{"if":{"properties":{"type":{"enum":["metric"]}}},"then":{"properties":{"spec":{"type":"object","description":"The 'metric' scalar is a target tracking scalar based on a CloudWatch Metric.","required":["namespace","metric","target"],"properties":{"namespace":{"type":"string","description":"The namespace of the CloudWatch metric."},"metric":{"type":"string","description":"The name of the CloudWatch metric."},"statistic":{"type":"string","enum":["Average","Minimum","Maximum","SampleCount","Sum"],"nullable":true,"description":"The metric statistic to use, one of (Average | Minimum | Maximum | SampleCount | Sum). The default is Average."},"target":{"type":"number","description":"The target, or desired value, of the metric. Scaling is based on keeping the metric at this target."},"unit":{"type":"string","enum":["MetricName","Counts.member.N","Dimensions.member.N","StatisticValues","StorageResolution","Timestamp","Unit","Value","Values.member.N"],"nullable":true,"description":"The unit of the metric, one of (MetricName | Counts.member.N | Dimensions.member.N | StatisticValues | StorageResolution | Timestamp | Unit | Value | Values.member.N)."},"dimensions":{"type":"array","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}},"nullable":true,"description":"The dimensions of the metric"}}}}}}],"oneOf":[{"type":"object","required":["type","spec"],"properties":{"type":{"type":"string","enum":["requests"]},"spec":{"type":"object","description":"The 'requests' scalar is based on the number of requests/minute.","required":["targetPerInstance"],"properties":{"targetPerInstance":{"type":"number","minimum":0,"description":"The threshold for requests/minute per instance that will trigger scaling."}}}}},{"type":"object","required":["type","spec"],"properties":{"type":{"type":"string","enum":["resource"]},"spec":{"type":"object","description":"The 'resource' scalar is based on the percentage of a resource used.","required":["resourceName","targetPercentage"],"properties":{"resourceName":{"type":"string","enum":["cpu","memory"],"description":"The resource used by this scalar, one of: (cpu | memory)."},"targetPercentage":{"type":"number","minimum":0,"maximum":100,"description":"The threshold for percentage of this resource that will trigger scaling."}}}}},{"type":"object","required":["type","spec"],"properties":{"type":{"type":"string","enum":["sqs"],"description":"Type identifier for an SQS scalar."},"spec":{"type":"object","description":"Specification for an SQS (Simple Queue Service) scalar.","required":["queueLength","queueName"],"properties":{"queueLength":{"type":"string","description":"The length of the SQS queue as a string."},"queueName":{"type":"string","description":"The name of the SQS queue."}}}}},{"type":"object","required":["type","spec"],"properties":{"type":{"type":"string","enum":["metric"]},"spec":{"type":"object","description":"The 'metric' scalar is a target tracking scalar based on a CloudWatch Metric.","required":["namespace","metric","target"],"properties":{"namespace":{"type":"string","description":"The namespace of the CloudWatch metric."},"metric":{"type":"string","description":"The name of the CloudWatch metric."},"statistic":{"type":"string","enum":["Average","Minimum","Maximum","SampleCount","Sum"],"nullable":true,"description":"The metric statistic to use, one of (Average | Minimum | Maximum | SampleCount | Sum). The default is Average."},"target":{"type":"number","description":"The target, or desired value, of the metric. Scaling is based on keeping the metric at this target."},"unit":{"type":"string","enum":["MetricName","Counts.member.N","Dimensions.member.N","StatisticValues","StorageResolution","Timestamp","Unit","Value","Values.member.N"],"nullable":true,"description":"The unit of the metric, one of (MetricName | Counts.member.N | Dimensions.member.N | StatisticValues | StorageResolution | Timestamp | Unit | Value | Values.member.N)."},"dimensions":{"type":"array","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}},"nullable":true,"description":"The dimensions of the metric"}}}}}]},"description":"The list of conditions that will trigger scaling events."}}},{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean","enum":[false]}}}],"nullable":true},"resources":{"type":"object","description":"The cpu and memory used by each pod.","required":["requests"],"properties":{"requests":{"type":"object","required":["cpu","memory"],"properties":{"cpu":{"description":"The amount of cpu used, either number of cores, or string of millicores (10m - 9999m).","oneOf":[{"type":"string","pattern":"^[1-9][0-9]{1,3}m$"},{"type":"number","minimum":0.01,"maximum":9.999}]},"memory":{"type":"string","description":"The amount of memory either in mebibytes (10Mi - 9999Mi) or gibibytes (1Gi - 99Gi).","oneOf":[{"pattern":"^[1-9][0-9]{1,3}Mi$"},{"pattern":"^[1-9][0-9]{0,1}Gi$"}]},"ephemeralStorage":{"nullable":true,"type":"string","description":"The total amount, in Gi, of ephemeral storage to set for the task. The minimum supported value is 21 Gi and the maximum supported value is 200 Gi.","pattern":"^(2[1-9]|[3-9][0-9]|1[0-9]{2}|200)Gi$"}},"description":"The mininum cpu and memory used by each pod."},"limits":{"type":"object","required":["cpu","memory"],"properties":{"cpu":{"description":"The amount of cpu used, either number of cores, or string of millicores (10m - 9999m).","oneOf":[{"type":"string","pattern":"^[1-9][0-9]{1,3}m$"},{"type":"number","minimum":0.01,"maximum":9.999}]},"memory":{"type":"string","description":"The amount of memory either in mebibytes (10Mi - 9999Mi) or gibibytes (1Gi - 99Gi).","oneOf":[{"pattern":"^[1-9][0-9]{1,3}Mi$"},{"pattern":"^[1-9][0-9]{0,1}Gi$"}]},"ephemeralStorage":{"nullable":true,"type":"string","description":"The total amount, in Gi, of ephemeral storage to set for the task. The minimum supported value is 21 Gi and the maximum supported value is 200 Gi.","pattern":"^(2[1-9]|[3-9][0-9]|1[0-9]{2}|200)Gi$"}},"description":"The maxumim cpu and memory that each pod is allowed to reach under bursting conditions.","nullable":true}},"nullable":true},"ingress":{"type":"object","required":["hosts","backendProtocol"],"properties":{"hosts":{"type":"array","items":{"type":"string"}},"backendProtocol":{"type":"string","description":"Whether secure or non-secure protocol is used.","enum":["HTTP","HTTPS"]},"tlsTermination":{"type":"string","description":"If secure protocol used, where does the TLS terminate? Defaults to 'ingress'.","enum":["ingress","pod"],"nullable":true},"websitePaths":{"type":"array","items":{"type":"string"},"nullable":true},"annotations":{"type":"object","additionalProperties":{"type":"string"},"required":[],"nullable":true}},"nullable":true},"variables":{"type":"object","patternProperties":{"^[A-Z_][A-Z0-9_]*$":{"type":"string"}},"required":[],"description":"Literal string values that will that will be exposed to the pod's processes as environment variables.","nullable":true},"secrets":{"type":"object","patternProperties":{"^[A-Z_][A-Z0-9_]*$":{"type":"string"}},"required":[],"description":"The ARNs of SecretsManager secrets that will be decrypted and the value exposed to the pod's processes as environment variables.","nullable":true},"nodeSelectors":{"type":"object","additionalProperties":{"type":"string"},"required":[],"nullable":true}}},"eksPrimaryDeployEnvironment":{"type":"object","required":["name","clusterName","spec"],"properties":{"name":{"type":"string"},"enableApproval":{"type":"boolean","nullable":true},"enableCanary":{"type":"boolean","nullable":true},"enableSmoke":{"type":"boolean","nullable":true},"clusterName":{"type":"string"},"type":{"type":"string","enum":["primary"],"nullable":true},"spec":{"$ref":"#/definitions/eksPrimaryEnvironmentSpec"}}},"eksDeployEnvironment":{"type":"object","oneOf":[{"$ref":"#/definitions/eksPrimaryDeployEnvironment"}]},"httpGetCheckSpec":{"type":"object","required":["path"],"properties":{"path":{"type":"string"}}},"httpGetCheck":{"type":"object","required":["delaySeconds","type","spec"],"properties":{"delaySeconds":{"type":"number"},"type":{"type":"string","enum":["httpGet"]},"spec":{"type":"object","required":["path"],"properties":{"path":{"type":"string"}}}}},"execCheckSpec":{"type":"object","required":["command"],"properties":{"command":{"type":"array","items":{"type":"string"}}}},"execCheck":{"type":"object","required":["delaySeconds","type","spec"],"properties":{"delaySeconds":{"type":"number"},"type":{"type":"string","enum":["exec"]},"spec":{"type":"object","required":["command"],"properties":{"command":{"type":"array","items":{"type":"string"}}}}}},"tcpSocketCheckSpec":{"type":"object","required":["port"],"properties":{"port":{"type":"number"}}},"tcpSocketCheck":{"type":"object","required":["delaySeconds","type","spec"],"properties":{"delaySeconds":{"type":"number"},"type":{"type":"string","enum":["tcpSocket"]},"spec":{"type":"object","required":["port"],"properties":{"port":{"type":"number"}}}}},"eksCheck":{"type":"object","properties":{"type":{"type":"string","enum":["httpGet","exec","tcpSocket"]}},"oneOf":[{"$ref":"#/definitions/httpGetCheck"},{"$ref":"#/definitions/execCheck"},{"$ref":"#/definitions/tcpSocketCheck"}],"allOf":[{"if":{"properties":{"type":{"enum":["httpGet"]}}},"then":{"properties":{"spec":{"$ref":"#/definitions/httpGetCheckSpec"}}}},{"if":{"properties":{"type":{"enum":["exec"]}}},"then":{"properties":{"spec":{"$ref":"#/definitions/execCheckSpec"}}}},{"if":{"properties":{"type":{"enum":["tcpSocket"]}}},"then":{"properties":{"spec":{"$ref":"#/definitions/tcpSocketCheckSpec"}}}}]},"eksEnvironments":{"type":"object","description":"this is an ordered dictionary and will determine deploy order","patternProperties":{"^[a-z_][a-z0-9_]+$":{"$ref":"#/definitions/eksDeployEnvironment"}},"required":[]},"eksDeploymentSpec":{"type":"object","required":["infrastructure","ports","checks","environments"],"properties":{"serviceName":{"type":"string","nullable":true},"infrastructure":{"type":"object","properties":{"loadBalancerName":{"type":"string","nullable":true},"targetGroupName":{"type":"string","nullable":true},"runtimeIamRoleName":{"type":"string","nullable":true},"initIamRoleName":{"type":"string","nullable":true}}},"ports":{"type":"object","required":["external","target"],"properties":{"external":{"type":"number"},"target":{"type":"number"}}},"checks":{"type":"object","required":["health","readiness"],"properties":{"health":{"$ref":"#/definitions/eksCheck"},"readiness":{"$ref":"#/definitions/eksCheck"}}},"environmentDefaults":{"$ref":"#/definitions/eksPrimaryEnvironmentSpec"},"environments":{"$ref":"#/definitions/eksEnvironments"}}},"ecsDeployment":{"type":"object","nullable":true,"required":[],"properties":{"approveDeployment":{"type":"boolean","nullable":true,"description":"Should the pipeline pause for approval before deploying? Defaults to false."},"approveTeardown":{"type":"boolean","nullable":true,"description":"Should the pipeline pause for approval before tearing down tasks? Defaults to false."},"resources":{"type":"object","required":["cpu","memory"],"properties":{"cpu":{"description":"The amount of cpu used, either number of cores, or string of millicores (10m - 9999m).","oneOf":[{"type":"string","pattern":"^[1-9][0-9]{1,3}m$"},{"type":"number","minimum":0.01,"maximum":9.999}]},"memory":{"type":"string","description":"The amount of memory either in mebibytes (10Mi - 9999Mi) or gibibytes (1Gi - 99Gi).","oneOf":[{"pattern":"^[1-9][0-9]{1,3}Mi$"},{"pattern":"^[1-9][0-9]{0,1}Gi$"}]},"ephemeralStorage":{"nullable":true,"type":"string","description":"The total amount, in Gi, of ephemeral storage to set for the task. The minimum supported value is 21 Gi and the maximum supported value is 200 Gi.","pattern":"^(2[1-9]|[3-9][0-9]|1[0-9]{2}|200)Gi$"}},"nullable":true,"description":"The amount of cpu and memory used by each ecs task. For fargate, there are restrictions about how these can be paired."},"variables":{"type":"object","patternProperties":{"^[A-Z_][A-Z0-9_]*$":{"type":"string"}},"required":[],"nullable":true,"description":"The name/value pairs that should be exposed to each task as environment variables."},"secrets":{"type":"object","patternProperties":{"^[A-Z_][A-Z0-9_]*$":{"type":"string"}},"required":[],"nullable":true,"description":"The secrets that should be exposed to each task. The name is the environment variable name, and the value is the ARN of a SecretsManager secret that the TaskExecutionRole must have permissions to read."},"sidecars":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["logging","custom","aqua"],"description":"The type of sidecar, one of: (logging | custom | aqua). This value determines the schema for the spec."}},"allOf":[{"if":{"properties":{"type":{"enum":["logging"]}}},"then":{"properties":{"spec":{"type":"object","description":"The 'logging' sidecar config.","required":["memory"],"properties":{"version":{"type":"string","description":"The version comes from a logging image tag.","nullable":true},"memory":{"type":"string","description":"Maximum memory to allocate to logging sidecar. Memory unit can be e.g 50Mi, 0.5Gi or 5%"}}}}}},{"if":{"properties":{"type":{"enum":["custom"]}}},"then":{"properties":{"spec":{"type":"object","description":"The 'custom' sidecar config.","required":["image"],"properties":{"image":{"type":"string","description":"The image of a custom sidecar."},"memory":{"type":"string","description":"Maximum memory to allocate to custom sidecar. Memory unit can be e.g 50Mi, 0.5Gi or 5%","nullable":true}}}}}},{"if":{"properties":{"type":{"enum":["aqua"]}}},"then":{"properties":{"spec":{"type":"object","description":"The 'aqua' sidecar config.","required":["version"],"properties":{"version":{"type":"string","description":"The version of a aqua sidecar image."}}}}}}],"oneOf":[{"type":"object","required":["type","spec"],"properties":{"type":{"type":"string","enum":["logging"]},"spec":{"type":"object","description":"The 'logging' sidecar config.","required":["memory"],"properties":{"version":{"type":"string","description":"The version comes from a logging image tag.","nullable":true},"memory":{"type":"string","description":"Maximum memory to allocate to logging sidecar. Memory unit can be e.g 50Mi, 0.5Gi or 5%"}}}}},{"type":"object","required":["type","spec"],"properties":{"type":{"type":"string","enum":["custom"]},"spec":{"type":"object","description":"The 'custom' sidecar config.","required":["image"],"properties":{"image":{"type":"string","description":"The image of a custom sidecar."},"memory":{"type":"string","description":"Maximum memory to allocate to custom sidecar. Memory unit can be e.g 50Mi, 0.5Gi or 5%","nullable":true}}}}},{"type":"object","required":["type","spec"],"properties":{"type":{"type":"string","enum":["aqua"]},"spec":{"type":"object","description":"The 'aqua' sidecar config.","required":["version"],"properties":{"version":{"type":"string","description":"The version of a aqua sidecar image."}}}}}]},"nullable":true,"description":"The list of sidecars."},"hooks":{"type":"array","nullable":true,"items":{"type":"object","required":["step","type","spec"],"properties":{"step":{"type":"string","enum":["PreDeploy","PostDeploy","PostRollback","VerifyDeploy"],"description":"The name of the pipeline step."},"name":{"type":"string","nullable":true,"description":"The name of this hook that will display in the pipleine. If not provided it will default to '<step> <incrementing number>'"},"type":{"type":"string","enum":["jenkins"],"description":"The type of hook."},"spec":{"type":"object","required":["job","params"],"properties":{"job":{"type":"string","description":"The path to the jenkins job in format '<folder>/<job>'. The jenkins server is determined by 'settings.jenkinsUrl'."},"params":{"type":"object","required":[],"patternProperties":{"^[a-z_][a-z0-9_]+$":{"type":"string"}},"description":"The parameters that will be passed to the jenkins job."}},"description":"The specific settings for the hook, based on the type."}}},"description":"Hooks in to the deployment pipeline of this environment, allowing you to run custom steps."},"fileSystemMounts":{"type":"array","nullable":true,"items":{"type":"object","description":"The authorization configuration details for the Amazon EFS file system.","required":["containerPath","volumeAlias","volumeDirectory"],"properties":{"containerPath":{"type":"string","description":"The path in the container at which to expose the file system."},"volumeAlias":{"type":"string","description":"The name of the volume to mount."},"readOnly":{"type":"boolean","description":"default to true if not specified.","nullable":true},"volumeDirectory":{"type":"string","description":"The path on the Amazon EFS file system to mount."}}}},"verification":{"type":"object","description":"type of verification during deploy","nullable":true,"required":[],"properties":{"newRelic":{"type":"object","description":"verifications","required":["duration"],"nullable":true,"properties":{"duration":{"type":"string","description":"Time to run new relic verification"}}}}}}},"ecsMultiInstanceDeployment":{"type":"object","nullable":true,"required":[],"properties":{"approveDeployment":{"type":"boolean","nullable":true,"description":"Should the pipeline pause for approval before deploying? Defaults to false."},"approveTeardown":{"type":"boolean","nullable":true,"description":"Should the pipeline pause for approval before tearing down tasks? Defaults to false."},"resources":{"type":"object","required":["cpu","memory"],"properties":{"cpu":{"description":"The amount of cpu used, either number of cores, or string of millicores (10m - 9999m).","oneOf":[{"type":"string","pattern":"^[1-9][0-9]{1,3}m$"},{"type":"number","minimum":0.01,"maximum":9.999}]},"memory":{"type":"string","description":"The amount of memory either in mebibytes (10Mi - 9999Mi) or gibibytes (1Gi - 99Gi).","oneOf":[{"pattern":"^[1-9][0-9]{1,3}Mi$"},{"pattern":"^[1-9][0-9]{0,1}Gi$"}]},"ephemeralStorage":{"nullable":true,"type":"string","description":"The total amount, in Gi, of ephemeral storage to set for the task. The minimum supported value is 21 Gi and the maximum supported value is 200 Gi.","pattern":"^(2[1-9]|[3-9][0-9]|1[0-9]{2}|200)Gi$"}},"nullable":true,"description":"The amount of cpu and memory used by each ecs task. For fargate, there are restrictions about how these can be paired."},"variables":{"type":"object","patternProperties":{"^[A-Z_][A-Z0-9_]*$":{"type":"string"}},"required":[],"nullable":true,"description":"The name/value pairs that should be exposed to each task as environment variables."},"secrets":{"type":"object","patternProperties":{"^[A-Z_][A-Z0-9_]*$":{"type":"string"}},"required":[],"nullable":true,"description":"The secrets that should be exposed to each task. The name is the environment variable name, and the value is the ARN of a SecretsManager secret that the TaskExecutionRole must have permissions to read."},"sidecars":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["logging","custom","aqua"],"description":"The type of sidecar, one of: (logging | custom | aqua). This value determines the schema for the spec."}},"allOf":[{"if":{"properties":{"type":{"enum":["logging"]}}},"then":{"properties":{"spec":{"type":"object","description":"The 'logging' sidecar config.","required":["memory"],"properties":{"version":{"type":"string","description":"The version comes from a logging image tag.","nullable":true},"memory":{"type":"string","description":"Maximum memory to allocate to logging sidecar. Memory unit can be e.g 50Mi, 0.5Gi or 5%"}}}}}},{"if":{"properties":{"type":{"enum":["custom"]}}},"then":{"properties":{"spec":{"type":"object","description":"The 'custom' sidecar config.","required":["image"],"properties":{"image":{"type":"string","description":"The image of a custom sidecar."},"memory":{"type":"string","description":"Maximum memory to allocate to custom sidecar. Memory unit can be e.g 50Mi, 0.5Gi or 5%","nullable":true}}}}}},{"if":{"properties":{"type":{"enum":["aqua"]}}},"then":{"properties":{"spec":{"type":"object","description":"The 'aqua' sidecar config.","required":["version"],"properties":{"version":{"type":"string","description":"The version of a aqua sidecar image."}}}}}}],"oneOf":[{"type":"object","required":["type","spec"],"properties":{"type":{"type":"string","enum":["logging"]},"spec":{"type":"object","description":"The 'logging' sidecar config.","required":["memory"],"properties":{"version":{"type":"string","description":"The version comes from a logging image tag.","nullable":true},"memory":{"type":"string","description":"Maximum memory to allocate to logging sidecar. Memory unit can be e.g 50Mi, 0.5Gi or 5%"}}}}},{"type":"object","required":["type","spec"],"properties":{"type":{"type":"string","enum":["custom"]},"spec":{"type":"object","description":"The 'custom' sidecar config.","required":["image"],"properties":{"image":{"type":"string","description":"The image of a custom sidecar."},"memory":{"type":"string","description":"Maximum memory to allocate to custom sidecar. Memory unit can be e.g 50Mi, 0.5Gi or 5%","nullable":true}}}}},{"type":"object","required":["type","spec"],"properties":{"type":{"type":"string","enum":["aqua"]},"spec":{"type":"object","description":"The 'aqua' sidecar config.","required":["version"],"properties":{"version":{"type":"string","description":"The version of a aqua sidecar image."}}}}}]},"nullable":true,"description":"The list of sidecars."},"hooks":{"type":"array","nullable":true,"items":{"type":"object","required":["step","type","spec"],"properties":{"step":{"type":"string","enum":["PreDeploy","PostDeploy","PostRollback","VerifyDeploy"],"description":"The name of the pipeline step."},"name":{"type":"string","nullable":true,"description":"The name of this hook that will display in the pipleine. If not provided it will default to '<step> <incrementing number>'"},"type":{"type":"string","enum":["jenkins"],"description":"The type of hook."},"spec":{"type":"object","required":["job","params"],"properties":{"job":{"type":"string","description":"The path to the jenkins job in format '<folder>/<job>'. The jenkins server is determined by 'settings.jenkinsUrl'."},"params":{"type":"object","required":[],"patternProperties":{"^[a-z_][a-z0-9_]+$":{"type":"string"}},"description":"The parameters that will be passed to the jenkins job."}},"description":"The specific settings for the hook, based on the type."}}},"description":"Hooks in to the deployment pipeline of this environment, allowing you to run custom steps."},"fileSystemMounts":{"type":"array","nullable":true,"items":{"type":"object","description":"The authorization configuration details for the Amazon EFS file system.","required":["containerPath","volumeAlias","volumeDirectory"],"properties":{"containerPath":{"type":"string","description":"The path in the container at which to expose the file system."},"volumeAlias":{"type":"string","description":"The name of the volume to mount."},"readOnly":{"type":"boolean","description":"default to true if not specified.","nullable":true},"volumeDirectory":{"type":"string","description":"The path on the Amazon EFS file system to mount."}}}},"verification":{"type":"object","description":"type of verification during deploy","nullable":true,"required":[],"properties":{"newRelic":{"type":"object","description":"verifications","required":["duration"],"nullable":true,"properties":{"duration":{"type":"string","description":"Time to run new relic verification"}}}}},"scaling":{"type":"object","oneOf":[{"type":"object","required":["enabled","min","max"],"properties":{"enabled":{"type":"boolean","enum":[true]},"min":{"type":"number","minimum":0,"maximum":1000,"description":"The minimum number of instances that should be running."},"max":{"type":"number","minimum":0,"maximum":1000,"description":"The maximum number of instances that should be running."},"behavior":{"type":"object","required":["scaleDown","scaleUp"],"properties":{"scaleDown":{"type":"object","description":"Scale Cooldown time which defines times for scaling up and down","required":["cooldownSeconds"],"properties":{"cooldownSeconds":{"type":"number","description":"Time to scale up or down"}}},"scaleUp":{"type":"object","description":"Scale Cooldown time which defines times for scaling up and down","required":["cooldownSeconds"],"properties":{"cooldownSeconds":{"type":"number","description":"Time to scale up or down"}}}}},"scalars":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["requests","resource","sqs","metric"],"description":"The type of scalar, one of: (requests | resource | metric). This value determines the schema for the spec."}},"allOf":[{"if":{"properties":{"type":{"enum":["requests"]}}},"then":{"properties":{"spec":{"type":"object","description":"The 'requests' scalar is based on the number of requests/minute.","required":["targetPerInstance"],"properties":{"targetPerInstance":{"type":"number","minimum":0,"description":"The threshold for requests/minute per instance that will trigger scaling."}}}}}},{"if":{"properties":{"type":{"enum":["resource"]}}},"then":{"properties":{"spec":{"type":"object","description":"The 'resource' scalar is based on the percentage of a resource used.","required":["resourceName","targetPercentage"],"properties":{"resourceName":{"type":"string","enum":["cpu","memory"],"description":"The resource used by this scalar, one of: (cpu | memory)."},"targetPercentage":{"type":"number","minimum":0,"maximum":100,"description":"The threshold for percentage of this resource that will trigger scaling."}}}}}},{"if":{"properties":{"type":{"enum":["sqs"]}}},"then":{"properties":{"spec":{"type":"object","description":"Specification for an SQS (Simple Queue Service) scalar.","required":["queueLength","queueName"],"properties":{"queueLength":{"type":"string","description":"The length of the SQS queue as a string."},"queueName":{"type":"string","description":"The name of the SQS queue."}}}}}},{"if":{"properties":{"type":{"enum":["metric"]}}},"then":{"properties":{"spec":{"type":"object","description":"The 'metric' scalar is a target tracking scalar based on a CloudWatch Metric.","required":["namespace","metric","target"],"properties":{"namespace":{"type":"string","description":"The namespace of the CloudWatch metric."},"metric":{"type":"string","description":"The name of the CloudWatch metric."},"statistic":{"type":"string","enum":["Average","Minimum","Maximum","SampleCount","Sum"],"nullable":true,"description":"The metric statistic to use, one of (Average | Minimum | Maximum | SampleCount | Sum). The default is Average."},"target":{"type":"number","description":"The target, or desired value, of the metric. Scaling is based on keeping the metric at this target."},"unit":{"type":"string","enum":["MetricName","Counts.member.N","Dimensions.member.N","StatisticValues","StorageResolution","Timestamp","Unit","Value","Values.member.N"],"nullable":true,"description":"The unit of the metric, one of (MetricName | Counts.member.N | Dimensions.member.N | StatisticValues | StorageResolution | Timestamp | Unit | Value | Values.member.N)."},"dimensions":{"type":"array","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}},"nullable":true,"description":"The dimensions of the metric"}}}}}}],"oneOf":[{"type":"object","required":["type","spec"],"properties":{"type":{"type":"string","enum":["requests"]},"spec":{"type":"object","description":"The 'requests' scalar is based on the number of requests/minute.","required":["targetPerInstance"],"properties":{"targetPerInstance":{"type":"number","minimum":0,"description":"The threshold for requests/minute per instance that will trigger scaling."}}}}},{"type":"object","required":["type","spec"],"properties":{"type":{"type":"string","enum":["resource"]},"spec":{"type":"object","description":"The 'resource' scalar is based on the percentage of a resource used.","required":["resourceName","targetPercentage"],"properties":{"resourceName":{"type":"string","enum":["cpu","memory"],"description":"The resource used by this scalar, one of: (cpu | memory)."},"targetPercentage":{"type":"number","minimum":0,"maximum":100,"description":"The threshold for percentage of this resource that will trigger scaling."}}}}},{"type":"object","required":["type","spec"],"properties":{"type":{"type":"string","enum":["sqs"],"description":"Type identifier for an SQS scalar."},"spec":{"type":"object","description":"Specification for an SQS (Simple Queue Service) scalar.","required":["queueLength","queueName"],"properties":{"queueLength":{"type":"string","description":"The length of the SQS queue as a string."},"queueName":{"type":"string","description":"The name of the SQS queue."}}}}},{"type":"object","required":["type","spec"],"properties":{"type":{"type":"string","enum":["metric"]},"spec":{"type":"object","description":"The 'metric' scalar is a target tracking scalar based on a CloudWatch Metric.","required":["namespace","metric","target"],"properties":{"namespace":{"type":"string","description":"The namespace of the CloudWatch metric."},"metric":{"type":"string","description":"The name of the CloudWatch metric."},"statistic":{"type":"string","enum":["Average","Minimum","Maximum","SampleCount","Sum"],"nullable":true,"description":"The metric statistic to use, one of (Average | Minimum | Maximum | SampleCount | Sum). The default is Average."},"target":{"type":"number","description":"The target, or desired value, of the metric. Scaling is based on keeping the metric at this target."},"unit":{"type":"string","enum":["MetricName","Counts.member.N","Dimensions.member.N","StatisticValues","StorageResolution","Timestamp","Unit","Value","Values.member.N"],"nullable":true,"description":"The unit of the metric, one of (MetricName | Counts.member.N | Dimensions.member.N | StatisticValues | StorageResolution | Timestamp | Unit | Value | Values.member.N)."},"dimensions":{"type":"array","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}},"nullable":true,"description":"The dimensions of the metric"}}}}}]},"description":"The list of conditions that will trigger scaling events."}}},{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean","enum":[false]}}}],"nullable":true,"description":"The scaling behaviors for the ECS Service."},"waitBeforeTeardownMinutes":{"type":"number","nullable":true,"description":"The waiting time in minutes before tearing down old tasks."}}},"ecsDeployEnvironment":{"type":"object","required":["name","clusterName"],"properties":{"name":{"type":"string"},"enableApproval":{"type":"boolean","nullable":true},"enableCanary":{"type":"boolean","nullable":true},"enableSmoke":{"type":"boolean","nullable":true},"region":{"type":"string","nullable":true},"clusterName":{"type":"string"},"smoke":{"$ref":"#/definitions/ecsDeployment"},"canary":{"$ref":"#/definitions/ecsDeployment"},"primary":{"$ref":"#/definitions/ecsMultiInstanceDeployment"},"defaults":{"$ref":"#/definitions/ecsMultiInstanceDeployment"}}},"ecsEnvironments":{"type":"object","description":"this is an ordered dictionary and will determine deploy order","patternProperties":{"^[a-z_][a-z0-9_]+$":{"$ref":"#/definitions/ecsDeployEnvironment"}},"required":[]},"ecsDeploymentSpec":{"type":"object","required":["infrastructure","ports","checks","environments"],"properties":{"infrastructure":{"type":"object","required":["runtimeIamRoleName","initIamRoleName"],"properties":{"runtimeIamRoleName":{"type":"string"},"initIamRoleName":{"type":"string"},"loadBalancerName":{"type":"string","description":"LoadBalancerName is optional only if deploymentStrategy is rolling.","nullable":true},"operatingSystem":{"type":"string","enum":["LINUX","WINDOWS"],"description":"Default operatingSystem will be set to LINUX.","nullable":true},"launchType":{"type":"string","enum":["FARGATE","EC2"],"description":"Default LaunchType will be set to FARGATE.","nullable":true},"targetGroupNames":{"type":"object","properties":{"primary":{"type":"string"},"smoke":{"type":"string"}},"description":"IF targetGroupNames are provided at all, both values must be present.","required":[],"anyOf":[{"required":["primary","smoke"]},{"not":{"properties":{"primary":{"type":"string"}},"required":["primary"]}},{"not":{"properties":{"smoke":{"type":"string"}},"required":["smoke"]}}],"nullable":true},"securityGroupName":{"type":"string","nullable":true},"volumes":{"type":"array","nullable":true,"items":{"type":"object","properties":{"alias":{"type":"string","description":"The alias of the volume."},"type":{"type":"string","enum":["efs","s3","pvc"],"description":"The type of the volume."}},"allOf":[{"if":{"properties":{"type":{"enum":["efs"]}}},"then":{"properties":{"spec":{"type":"object","description":"The ECS volume specification.","required":["fileSystemName"],"properties":{"fileSystemName":{"type":"string","description":"The name of the Amazon EFS file system."}}}}}},{"if":{"properties":{"type":{"enum":["s3"]}}},"then":{"properties":{"spec":{"type":"object","description":"The S3 volume specification.","required":["bucketName"],"properties":{"bucketName":{"type":"string","description":"The name of the Amazon S3 bucket."}}}}}},{"if":{"properties":{"type":{"enum":["pvc"]}}},"then":{"properties":{"spec":{"type":"object","description":"The PVC volume specification.","required":["claimName"],"properties":{"claimName":{"type":"string","description":"The name of volume claim in EKS."}}}}}}],"oneOf":[{"type":"object","description":"The configuration details for a ECS volume.","required":["alias","type","spec"],"properties":{"alias":{"type":"string","description":"The alias of the volume."},"type":{"type":"string","enum":["efs"],"description":"The type of the volume."},"spec":{"type":"object","description":"The ECS volume specification.","required":["fileSystemName"],"properties":{"fileSystemName":{"type":"string","description":"The name of the Amazon EFS file system."}}}}},{"type":"object","description":"The configuration details for a S3 volume.","required":["alias","type","spec"],"properties":{"alias":{"type":"string","description":"The alias of the volume."},"type":{"type":"string","enum":["s3"],"description":"The type of the volume."},"spec":{"type":"object","description":"The S3 volume specification.","required":["bucketName"],"properties":{"bucketName":{"type":"string","description":"The name of the Amazon S3 bucket."}}}}},{"type":"object","description":"The configuration details for a PVC volume.","required":["alias","type","spec"],"properties":{"alias":{"type":"string","description":"The alias of the volume."},"type":{"type":"string","enum":["pvc"],"description":"The type of the volume."},"spec":{"type":"object","description":"The PVC volume specification.","required":["claimName"],"properties":{"claimName":{"type":"string","description":"The name of volume claim in EKS."}}}}}]}}}},"ports":{"type":"object","required":["external","target"],"properties":{"external":{"type":"number"},"target":{"type":"number"}}},"checks":{"type":"object","required":["health"],"properties":{"health":{"type":"object","required":["delaySeconds"],"properties":{"delaySeconds":{"type":"number"}}}}},"deployTimeout":{"type":"string","nullable":true},"deploymentStrategy":{"type":"string","enum":["blue_green","rolling"],"description":"Default deploymentStrategy will be set to 'blue_green'.","nullable":true},"environmentDefaults":{"$ref":"#/definitions/ecsMultiInstanceDeployment"},"environments":{"$ref":"#/definitions/ecsEnvironments"}}},"terraformPipelineSpec":{"type":"object","required":["terraformVersion","path","environments"],"properties":{"terraformVersion":{"type":"string","enum":["0.12","0.13","1.1","1.3","1.6"],"description":"The version of terraform that will be used."},"path":{"type":"string","description":"Location of the .tf files, relative to the repository root."},"region":{"type":"string","nullable":true},"environments":{"type":"object","additionalProperties":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"enableApproval":{"type":"boolean","nullable":true},"region":{"type":"string","nullable":true},"variables":{"type":"object","patternProperties":{"^[A-Z_][A-Z0-9_]*$":{"type":"string"}},"required":[],"description":"Environment Variables that will be available during terrafor plan, terraform apply, and any postDeploy steps.","nullable":true},"postDeployment":{"type":"object","nullable":true,"required":["steps"],"properties":{"variables":{"type":"object","patternProperties":{"^[A-Z_][A-Z0-9_]*$":{"type":"string"}},"required":[],"description":"Environment Variables that will be available during this postDeploy step.","nullable":true},"steps":{"type":"array","items":{"$ref":"#/definitions/customStep"}}}}}},"required":[]},"triggers":{"type":"array","items":{"$ref":"#/definitions/trigger"},"nullable":true}}},"approvalStepSpec":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}},"approvalStep":{"type":"object","required":["name","enabled","type","spec"],"properties":{"name":{"type":"string","description":"The name of the custom step."},"description":{"type":"string","description":"The description of the custom step.","nullable":true},"enabled":{"type":"boolean","description":"Whether or not the step is active."},"type":{"type":"string","enum":["approval"]},"spec":{"$ref":"#/definitions/approvalStepSpec"}},"additionalProperties":true},"scriptStepSpec":{"type":"object","required":["path"],"properties":{"path":{"type":"string"}}},"scriptStep":{"type":"object","required":["name","enabled","type","spec"],"properties":{"name":{"type":"string","description":"The name of the custom step."},"description":{"type":"string","description":"The description of the custom step.","nullable":true},"enabled":{"type":"boolean","description":"Whether or not the step is active."},"type":{"type":"string","enum":["script"]},"spec":{"$ref":"#/definitions/scriptStepSpec"}},"additionalProperties":true},"customStep":{"type":"object","properties":{"type":{"type":"string","enum":["approval","script"]}},"oneOf":[{"$ref":"#/definitions/approvalStep"},{"$ref":"#/definitions/scriptStep"}],"allOf":[{"if":{"properties":{"type":{"enum":["approval"]}}},"then":{"properties":{"spec":{"$ref":"#/definitions/approvalStepSpec"}}}},{"if":{"properties":{"type":{"enum":["script"]}}},"then":{"properties":{"spec":{"$ref":"#/definitions/scriptStepSpec"}}}}]},"weightedRoutingPipelineSpec":{"type":"object","required":["deploymentPipelines","environmentIds"],"properties":{"deploymentPipelines":{"type":"object","properties":{"pipeline1":{"type":"string"},"pipeline2":{"type":"string"}},"required":["pipeline1","pipeline2"],"additionalProperties":false},"environmentIds":{"type":"array","items":{"type":"string"}}}},"settings":{"type":"object","properties":{"notificationSlackChannel":{"type":"string","description":"A slack channel name for pipeline notifications.","nullable":true},"agileTeamName":{"type":"string","description":"name of the team","nullable":true}}}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment