|
|
@@ -1,201 +0,0 @@
|
|
|
-{
|
|
|
- "$schema": "http://json-schema.org/schema#",
|
|
|
- "title": "schema for the default deploy driver",
|
|
|
- "type": "object",
|
|
|
- "properties": {
|
|
|
- "name": {
|
|
|
- "type": "string",
|
|
|
- "description": "resource name",
|
|
|
- "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
|
|
|
- "maxLength": 50
|
|
|
- },
|
|
|
- "driver": {
|
|
|
- "type": "string",
|
|
|
- "description": "resource driver",
|
|
|
- "enum": ["deploy", ""]
|
|
|
- },
|
|
|
- "depends_on": {
|
|
|
- "type": "array",
|
|
|
- "description": "list of resource names this resource depends on",
|
|
|
- "minItems": 1,
|
|
|
- "items": {
|
|
|
- "type": "string",
|
|
|
- "description": "dependency resource name",
|
|
|
- "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
|
|
|
- "maxLength": 50
|
|
|
- }
|
|
|
- },
|
|
|
- "source": {
|
|
|
- "type": "object",
|
|
|
- "description": "resource source",
|
|
|
- "properties": {
|
|
|
- "name": {
|
|
|
- "type": "string",
|
|
|
- "description": "source Helm chart name"
|
|
|
- },
|
|
|
- "version": {
|
|
|
- "type": "string",
|
|
|
- "description": "source Helm chart version"
|
|
|
- },
|
|
|
- "repo": {
|
|
|
- "type": "string",
|
|
|
- "description": "source Helm chart repo URL",
|
|
|
- "default": "https://charts.getporter.dev"
|
|
|
- }
|
|
|
- },
|
|
|
- "required": ["name"]
|
|
|
- },
|
|
|
- "target": {
|
|
|
- "type": "object",
|
|
|
- "description": "resource target",
|
|
|
- "properties": {
|
|
|
- "project": {
|
|
|
- "type": "integer",
|
|
|
- "description": "target Porter project ID"
|
|
|
- },
|
|
|
- "cluster": {
|
|
|
- "type": "integer",
|
|
|
- "description": "target Porter cluster ID"
|
|
|
- },
|
|
|
- "namespace": {
|
|
|
- "type": "string",
|
|
|
- "description": "target namespace"
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- "config": {
|
|
|
- "type": "object",
|
|
|
- "description": "resource configuration",
|
|
|
- "additionalProperties": true
|
|
|
- },
|
|
|
- "if": {
|
|
|
- "properties": {
|
|
|
- "source": {
|
|
|
- "properties": { "repo": { "const": "https://charts.getporter.dev" } }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- "then": {
|
|
|
- "properties": {
|
|
|
- "config": {
|
|
|
- "properties": {
|
|
|
- "waitForJob": {
|
|
|
- "type": "boolean",
|
|
|
- "description": "wait for job to complete"
|
|
|
- },
|
|
|
- "onlyCreate": {
|
|
|
- "type": "boolean",
|
|
|
- "description": "only create the resource"
|
|
|
- },
|
|
|
- "build": {
|
|
|
- "type": "object",
|
|
|
- "description": "build configuration",
|
|
|
- "properties": {
|
|
|
- "use_cache": {
|
|
|
- "type": "boolean",
|
|
|
- "description": "use Porter build cache"
|
|
|
- },
|
|
|
- "method": {
|
|
|
- "type": "string",
|
|
|
- "description": "build method",
|
|
|
- "default": "docker",
|
|
|
- "enum": ["docker", "pack", "registry"]
|
|
|
- },
|
|
|
- "context": {
|
|
|
- "type": "string",
|
|
|
- "description": "build context"
|
|
|
- },
|
|
|
- "dockerfile": {
|
|
|
- "type": "string",
|
|
|
- "description": "Dockerfile path"
|
|
|
- },
|
|
|
- "image": {
|
|
|
- "type": "string",
|
|
|
- "description": "image name"
|
|
|
- },
|
|
|
- "builder": {
|
|
|
- "type": "string",
|
|
|
- "description": "buildpacks builder image"
|
|
|
- },
|
|
|
- "buildpacks": {
|
|
|
- "type": "array",
|
|
|
- "description": "list of buildpacks",
|
|
|
- "minItems": 1,
|
|
|
- "items": {
|
|
|
- "type": "string",
|
|
|
- "description": "buildpack"
|
|
|
- }
|
|
|
- },
|
|
|
- "env": {
|
|
|
- "type": "object",
|
|
|
- "description": "build-time environment variables",
|
|
|
- "additionalProperties": { "type": "string" }
|
|
|
- }
|
|
|
- },
|
|
|
- "allOf": [
|
|
|
- {
|
|
|
- "if": {
|
|
|
- "properties": {
|
|
|
- "method": { "const": "docker" }
|
|
|
- }
|
|
|
- },
|
|
|
- "then": {
|
|
|
- "dependentRequired": {
|
|
|
- "method": ["dockerfile"]
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "if": {
|
|
|
- "properties": {
|
|
|
- "method": { "const": "registry" }
|
|
|
- }
|
|
|
- },
|
|
|
- "then": {
|
|
|
- "dependentRequired": {
|
|
|
- "method": ["image"]
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- "env_groups": {
|
|
|
- "type": "array",
|
|
|
- "description": "list of environment groups to use in the deployment",
|
|
|
- "minItems": 1,
|
|
|
- "items": {
|
|
|
- "type": "object",
|
|
|
- "description": "environment group",
|
|
|
- "properties": {
|
|
|
- "name": {
|
|
|
- "type": "string",
|
|
|
- "description": "environment group name"
|
|
|
- },
|
|
|
- "version": {
|
|
|
- "type": "integer",
|
|
|
- "minimum": 0,
|
|
|
- "default": 0,
|
|
|
- "description": "environment group version"
|
|
|
- },
|
|
|
- "namespace": {
|
|
|
- "type": "string",
|
|
|
- "description": "environment group namespace"
|
|
|
- }
|
|
|
- },
|
|
|
- "required": ["name"]
|
|
|
- }
|
|
|
- },
|
|
|
- "values": {
|
|
|
- "type": "object",
|
|
|
- "description": "Helm values to use for the deployment",
|
|
|
- "additionalProperties": true
|
|
|
- }
|
|
|
- },
|
|
|
- "required": ["build"]
|
|
|
- }
|
|
|
- },
|
|
|
- "required": ["config"]
|
|
|
- }
|
|
|
- },
|
|
|
- "required": ["name", "source"]
|
|
|
-}
|