{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "ProjectConfig", "type": "object", "properties": { "concurrency": { "description": "Task concurrency.\nValid only in a root project config.\n```yaml\nconcurrency: 4\n```", "type": "integer", "format": "uint", "default": 4, "minimum": 0 }, "depends_on": { "description": "Dependency tasks for all the project tasks.\n```yaml\ndepends_on:\n - '#install'\n```", "type": "array", "default": [], "items": { "$ref": "#/$defs/DependsOnConfig" }, "x-template": true }, "env": { "description": "Environment variables for all the project tasks.\n```yaml\nenv:\n TZ: Asia/Tokyo\n```", "type": "object", "additionalProperties": { "type": "string" }, "default": {}, "x-template": true }, "env_files": { "description": "Dotenv files for all the project tasks.\nIn case of duplicated environment variables, the latter one takes precedence.\n```yaml\nenv_files:\n - .env\n - .env.local\n```", "type": "array", "default": [], "items": { "type": "string" }, "x-template": true }, "gantt_file": { "description": "Gantt chart output file path.\nValid only in a root project config.\n```yaml\ngantt_file: gantt.svg\n```", "type": [ "string", "null" ] }, "includes": { "description": "Additional config files to be included.\n```yaml\nincludes:\n - common-vars.yml\n - common-tasks.yml\n```", "type": "array", "default": [], "items": { "type": "string" }, "x-template": true }, "log": { "description": "Log configuration.\nValid only in a root project config.\n```yaml\nlog:\n level: debug\n file: \"{{ root_dir }}/firepit.log\"\n```", "$ref": "#/$defs/LogConfig", "default": { "file": null, "level": "info" } }, "projects": { "description": "Child projects.\nValid only in a root project config.\n```yaml\nprojects:\n client: packages/client\n server: packages/server\n```", "type": "object", "additionalProperties": { "type": "string" }, "default": {} }, "shell": { "description": "Shell configuration for all the project tasks.\n```yaml\nshell:\n command: \"bash\"\n args: [\"-eux\", \"-c\"]\n```", "$ref": "#/$defs/ShellConfig", "default": { "args": [ "-c" ], "command": "bash" } }, "tasks": { "description": "Task definitions.", "type": "object", "additionalProperties": { "$ref": "#/$defs/TaskConfig" }, "default": {} }, "ui": { "description": "UI configuration.\nValid only in a root project config.\n```yaml\nui: cui\n```", "$ref": "#/$defs/UI", "default": "cui" }, "vars": { "description": "Template variables for all the project tasks.\n```yaml\nvars:\n aws_account_id: 123456789012\n aws_region: ap-northeast-1\n ecr_registry: \"{{ aws_account_id }}.dkr.ecr.{{ aws_region }}.amazonaws.com\"\n```", "type": "object", "additionalProperties": true, "default": {}, "x-template": true }, "working_dir": { "description": "Working directory for all the project tasks.\n```yaml\nworking_dir: src\n```", "type": "string", "default": ".", "x-template": true } }, "$defs": { "DependsOnConfig": { "anyOf": [ { "type": "string" }, { "$ref": "#/$defs/DependsOnConfigStruct" } ], "x-template": true }, "DependsOnConfigStruct": { "type": "object", "properties": { "cascade": { "description": "Whether the task restarts if this dependency task restarts.", "type": "boolean", "default": true }, "task": { "description": "Dependency task name", "type": "string", "x-template": true }, "vars": { "description": "Variables to override the dependency task vars.", "type": "object", "additionalProperties": true, "default": {}, "x-template": true } }, "required": [ "task" ] }, "ExecProbeConfig": { "type": "object", "properties": { "command": { "description": "Command to check if the service is ready", "type": "string", "x-template": true }, "env": { "description": "Environment variables. Merged with the task `env`.", "type": "object", "additionalProperties": { "type": "string" }, "default": {}, "x-template": true }, "env_files": { "description": "Dotenv files. Merged with the task `env_files`.", "type": "array", "default": [], "items": { "type": "string" }, "x-template": true }, "interval": { "description": "Interval in seconds.\nThe command will run interval seconds after the task is started,\nand then again interval seconds after each previous check completes.", "type": "integer", "format": "uint64", "default": 5, "minimum": 0 }, "retries": { "description": "Number of consecutive readiness-check failures allowed before giving up.", "type": "integer", "format": "uint64", "default": 3, "minimum": 0 }, "shell": { "description": "Shell configuration", "anyOf": [ { "$ref": "#/$defs/ShellConfig" }, { "type": "null" } ] }, "start_period": { "description": "Initialization period in seconds.\nProbe failure during that period will not be counted towards the maximum number of retries.", "type": "integer", "format": "uint64", "default": 0, "minimum": 0 }, "timeout": { "description": "Timeout in seconds", "type": "integer", "format": "uint64", "default": 5, "minimum": 0 }, "working_dir": { "description": "Working directory", "type": [ "string", "null" ], "x-template": true } }, "required": [ "command" ] }, "HealthCheckConfig": { "anyOf": [ { "$ref": "#/$defs/LogProbeConfig" }, { "$ref": "#/$defs/ExecProbeConfig" } ] }, "LogConfig": { "type": "object", "properties": { "file": { "description": "Log file path.", "type": [ "string", "null" ] }, "level": { "description": "Log level. Valid values: error, warn, info, debug, trace", "type": "string", "default": "info" } } }, "LogProbeConfig": { "type": "object", "properties": { "log": { "description": "Log regex pattern to determine the task service is ready", "type": "string", "x-template": true }, "timeout": { "description": "Timeout in seconds", "type": "integer", "format": "uint64", "default": 20, "minimum": 0 } }, "required": [ "log" ] }, "Restart": { "anyOf": [ { "type": "string", "enum": [ "always", "on-failure", "never" ] }, { "type": "string", "pattern": "^(always(:\\d+)?|on-failure(:\\d+)?|never)$" } ] }, "ServiceConfig": { "anyOf": [ { "type": "boolean" }, { "$ref": "#/$defs/ServiceConfigStruct" } ] }, "ServiceConfigStruct": { "type": "object", "properties": { "healthcheck": { "description": "Readiness probe configuration", "anyOf": [ { "$ref": "#/$defs/HealthCheckConfig" }, { "type": "null" } ] }, "restart": { "description": "Restart policy", "$ref": "#/$defs/Restart", "default": "never" } } }, "ShellConfig": { "type": "object", "properties": { "args": { "description": "Arguments of the shell command.", "type": "array", "default": [ "-c" ], "items": { "type": "string" } }, "command": { "description": "Shell command.", "type": "string", "default": "bash" } } }, "TaskConfig": { "type": "object", "properties": { "command": { "description": "Command to run", "type": [ "string", "null" ], "x-template": true }, "depends_on": { "description": "Dependency tasks", "type": "array", "default": [], "items": { "$ref": "#/$defs/DependsOnConfig" }, "x-template": true }, "description": { "description": "Description", "type": [ "string", "null" ] }, "env": { "description": "Environment variables. Merged with the project `env`.", "type": "object", "additionalProperties": { "type": "string" }, "default": {}, "x-template": true }, "env_files": { "description": "Dotenv files. Merged with the project `env_files`.", "type": "array", "default": [], "items": { "type": "string" }, "x-template": true }, "inputs": { "description": "Inputs file glob patterns", "type": "array", "default": [], "items": { "type": "string" } }, "label": { "description": "Label to display instead of the task name.", "type": [ "string", "null" ], "x-template": true }, "outputs": { "description": "Output file glob patterns", "type": "array", "default": [], "items": { "type": "string" } }, "service": { "description": "Service configurations", "anyOf": [ { "$ref": "#/$defs/ServiceConfig" }, { "type": "null" } ] }, "shell": { "description": "Shell configuration", "anyOf": [ { "$ref": "#/$defs/ShellConfig" }, { "type": "null" } ] }, "vars": { "description": "Template variables. Merged with the project `vars`.\nCan be used at `label`, `command`, `working_dir`, `env`, `env_files`, `depends_on`, `depends_on.{task, vars}`,\n`service.healthcheck.log` and `service.healthcheck.exec.{command, working_dir, env, env_files}`", "type": "object", "additionalProperties": true, "default": {}, "x-template": true }, "working_dir": { "description": "Working directory\n```yaml\nworking_dir: dist\n```", "type": [ "string", "null" ], "x-template": true } } }, "UI": { "type": "string", "enum": [ "cui", "tui" ] } } }