class
Squarectl::Task
- Squarectl::Task
- Reference
- Object
Overview
A fully resolved unit of work for a single (target, environment) pair.
TaskFactory builds it by merging the global all environment with the
selected one; the Tasks::* orchestrators then call the command-building
methods mixed in from Commands::* (which ultimately shell out through the
injected Executor). Holding the merged values here means the command
builders never touch the raw config again.
:nodoc:
Included Modules
- Squarectl::Commands::Compose
- Squarectl::Commands::Configs
- Squarectl::Commands::Info
- Squarectl::Commands::Kompose
- Squarectl::Commands::Kubectl
- Squarectl::Commands::Networks
- Squarectl::Commands::Secrets
- Squarectl::Commands::SetupCommands
- Squarectl::Commands::SSLCertificates
- Squarectl::Commands::Swarm
- YAML::Serializable
Defined in:
squarectl/task.crConstructors
- .new(target : String, environment : Squarectl::Config::SquarectlEnvironment, env_vars : Hash(String, String), domains : Hash(String, String), compose_files : Array(String), compose_networks : Array(String), ssl_certificates : Array(Hash(String, String)), setup_commands : Array(Hash(String, String | Array(String))), deploy_server : String, deploy_configs : Hash(String, String), deploy_secrets : Hash(String, String), executor : Squarectl::Executor)
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
Instance Method Summary
- #compose_files : Array(String)
-
#compose_files_args(prefix)
Turns the resolved compose file list into repeated
<prefix> <file>argv pairs, e.g. - #compose_networks : Array(String)
- #deploy_configs : Hash(String, String)
- #deploy_secrets : Hash(String, String)
- #deploy_server : String
- #domains : Hash(String, String)
- #env_vars : Hash(String, String)
- #environment : Squarectl::Config::SquarectlEnvironment
-
#project_name
Docker Compose/Swarm project name, e.g.
-
#runtime_env_vars
SQUARECTL_*variables always injected into the child process so compose files and setup commands can reference them. - #setup_commands : Array(Hash(String, Array(String) | String))
- #ssl_certificates : Array(Hash(String, String))
- #target : String
-
#task_env_vars
Full environment handed to every spawned command: runtime vars overlaid with the config's env vars and the derived domain vars.
Instance methods inherited from module Squarectl::Commands::Swarm
run_docker_stack_deploy
run_docker_stack_deploy,
run_docker_stack_destroy
run_docker_stack_destroy,
run_swarm_setup_commands
run_swarm_setup_commands
Instance methods inherited from module Squarectl::Commands::SSLCertificates
create_ssl_certificate(ssl_cert)
create_ssl_certificate,
create_ssl_certificates
create_ssl_certificates,
destroy_ssl_certificate(ssl_cert)
destroy_ssl_certificate,
destroy_ssl_certificates
destroy_ssl_certificates
Instance methods inherited from module Squarectl::Commands::SetupCommands
run_docker_compose_setup_commands
run_docker_compose_setup_commands
Instance methods inherited from module Squarectl::Commands::Secrets
create_docker_secret(key, file)
create_docker_secret,
create_docker_secrets(args)
create_docker_secrets,
destroy_docker_secret(key, file)
destroy_docker_secret,
destroy_docker_secrets(args)
destroy_docker_secrets
Instance methods inherited from module Squarectl::Commands::Networks
create_docker_network(net)
create_docker_network,
create_docker_networks
create_docker_networks,
destroy_docker_network(net)
destroy_docker_network,
destroy_docker_networks
destroy_docker_networks,
docker_network_exists?(net)
docker_network_exists?
Instance methods inherited from module Squarectl::Commands::Kubectl
run_kubectl_apply
run_kubectl_apply,
run_kubectl_setup_commands
run_kubectl_setup_commands
Instance methods inherited from module Squarectl::Commands::Kompose
run_kompose(action, args)
run_kompose,
run_kompose_convert(config, args)
run_kompose_convert
Instance methods inherited from module Squarectl::Commands::Info
print_info
print_info,
squarectl_environment
squarectl_environment
Instance methods inherited from module Squarectl::Commands::Configs
create_docker_config(key, file)
create_docker_config,
create_docker_configs(args)
create_docker_configs,
destroy_docker_config(key, file)
destroy_docker_config,
destroy_docker_configs(args)
destroy_docker_configs
Instance methods inherited from module Squarectl::Commands::Compose
build_docker_compose_command(action, args)
build_docker_compose_command,
capture_docker_compose(action, args)
capture_docker_compose,
exec_docker_compose(action, args) : NoReturn
exec_docker_compose,
extract_docker_args(args)
extract_docker_args,
run_docker_compose(action, args)
run_docker_compose
Constructor Detail
Instance Method Detail
Turns the resolved compose file list into repeated <prefix> <file> argv
pairs, e.g. --file a.yml --file b.yml.
SQUARECTL_* variables always injected into the child process so compose
files and setup commands can reference them.
Full environment handed to every spawned command: runtime vars overlaid with the config's env vars and the derived domain vars.