Class: Kamal::Configuration::Validator::Builder

Inherits:
Kamal::Configuration::Validator show all
Defined in:
lib/kamal/configuration/validator/builder.rb

Instance Attribute Summary

Attributes inherited from Kamal::Configuration::Validator

#config, #context, #example

Instance Method Summary collapse

Methods inherited from Kamal::Configuration::Validator

#initialize

Constructor Details

This class inherits a constructor from Kamal::Configuration::Validator

Instance Method Details

#validate!Object



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/kamal/configuration/validator/builder.rb', line 2

def validate!
  super

  if config["cache"] && config["cache"]["type"]
    error "Invalid cache type: #{config["cache"]["type"]}" unless [ "gha", "registry" ].include?(config["cache"]["type"])
  end

  error "Builder arch not set" unless config["arch"].present?

  error "Cannot disable local builds, no remote is set" if config["local"] == false && config["remote"].blank?
end