Class: Vx::Builder::ScriptBuilder::Base

Inherits:
Struct
  • Object
show all
Includes:
Helper::TraceShCommand, Helper::VxvmInstall
Defined in:
lib/vx/builder/script_builder/base.rb

Direct Known Subclasses

Cache, Clojure, Defaults, Deploy, Env, Go, Java, Nodejs, Ruby, Rust, Scala, Services, Timeouts

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helper::VxvmInstall

#vxvm_install

Methods included from Helper::TraceShCommand

#trace_sh_command

Instance Attribute Details

#appObject

Returns the value of attribute app

Returns:

  • (Object)

    the current value of app



5
6
7
# File 'lib/vx/builder/script_builder/base.rb', line 5

def app
  @app
end

Instance Method Details

#deploy?(env) ⇒ Boolean

Returns:

  • (Boolean)


58
59
60
# File 'lib/vx/builder/script_builder/base.rb', line 58

def deploy?(env)
  env.source.deploy_modules?
end

#do_after_deploy(env) ⇒ Object



52
53
54
55
56
# File 'lib/vx/builder/script_builder/base.rb', line 52

def do_after_deploy(env)
  if deploy?(env)
    yield env.after_success
  end
end

#do_announce(env) {|env.announce| ... } ⇒ Object

Yields:

  • (env.announce)


26
27
28
# File 'lib/vx/builder/script_builder/base.rb', line 26

def do_announce(env)
  yield env.announce
end

#do_before_deploy(env) ⇒ Object



46
47
48
49
50
# File 'lib/vx/builder/script_builder/base.rb', line 46

def do_before_deploy(env)
  if deploy?(env)
    yield env.before_script
  end
end

#do_before_install(env) {|env.before_install| ... } ⇒ Object

Yields:

  • (env.before_install)


30
31
32
# File 'lib/vx/builder/script_builder/base.rb', line 30

def do_before_install(env)
  yield env.before_install
end

#do_cache_key(env) {|env.cache_key| ... } ⇒ Object

Yields:

  • (env.cache_key)


10
11
12
# File 'lib/vx/builder/script_builder/base.rb', line 10

def do_cache_key(env)
  yield env.cache_key
end

#do_cached_directories(env) ⇒ Object



20
21
22
23
24
# File 'lib/vx/builder/script_builder/base.rb', line 20

def do_cached_directories(env)
  if env.source.cached_directories != false
    yield env.cached_directories
  end
end

#do_deploy_script(env) ⇒ Object



40
41
42
43
44
# File 'lib/vx/builder/script_builder/base.rb', line 40

def do_deploy_script(env)
  if deploy?(env)
    yield env.script
  end
end

#do_install(env) ⇒ Object



34
35
36
37
38
# File 'lib/vx/builder/script_builder/base.rb', line 34

def do_install(env)
  if env.source.install.empty?
    yield env.install
  end
end

#do_script(env) ⇒ Object



14
15
16
17
18
# File 'lib/vx/builder/script_builder/base.rb', line 14

def do_script(env)
  if env.source.script.empty? && !env.source.deploy_modules?
    yield env.script
  end
end