Class: Buildizer::Ci::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/buildizer/ci/base.rb

Direct Known Subclasses

GitlabCi, Travis

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(packager) ⇒ Base

Returns a new instance of Base.



8
9
10
11
12
# File 'lib/buildizer/ci/base.rb', line 8

def initialize(packager)
  super()

  @packager = packager
end

Instance Attribute Details

#packagerObject (readonly)

Returns the value of attribute packager.



6
7
8
# File 'lib/buildizer/ci/base.rb', line 6

def packager
  @packager
end

Class Method Details

.ci_nameObject



70
71
72
# File 'lib/buildizer/ci/base.rb', line 70

def ci_name
  raise
end

Instance Method Details

#_git_tagObject



43
44
45
# File 'lib/buildizer/ci/base.rb', line 43

def _git_tag
  raise
end

#buildizer_install_instructions(master: nil) ⇒ Object



47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/buildizer/ci/base.rb', line 47

def buildizer_install_instructions(master: nil)
  if master
    ['git clone https://github.com/flant/buildizer ~/buildizer',
     'echo "export BUNDLE_GEMFILE=~/buildizer/Gemfile" | tee -a ~/.bashrc',
     'export BUNDLE_GEMFILE=~/buildizer/Gemfile',
     'gem install bundler',
     'gem install overcommit',
     'bundle install',
    ]
  else
    'gem install buildizer'
  end
end

#ci_nameObject



26
27
28
# File 'lib/buildizer/ci/base.rb', line 26

def ci_name
  self.class.ci_name
end

#confObject



14
15
16
# File 'lib/buildizer/ci/base.rb', line 14

def conf
  @conf ||= conf_path.load_yaml
end

#conf_file_nameObject



22
23
24
# File 'lib/buildizer/ci/base.rb', line 22

def conf_file_name
  ".#{ci_name}.yml"
end

#conf_pathObject



18
19
20
# File 'lib/buildizer/ci/base.rb', line 18

def conf_path
  packager.package_path.join(conf_file_name)
end

#configuration_actual?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/buildizer/ci/base.rb', line 34

def configuration_actual?
  raise
end

#docker_cache_setup!Object



65
66
67
# File 'lib/buildizer/ci/base.rb', line 65

def docker_cache_setup!
  raise
end

#git_tagObject



38
39
40
41
# File 'lib/buildizer/ci/base.rb', line 38

def git_tag
  res = _git_tag.to_s
  if res.empty? then nil else res end
end

#package_cloud_setup!Object



61
62
63
# File 'lib/buildizer/ci/base.rb', line 61

def package_cloud_setup!
  raise
end

#setup!Object



30
31
32
# File 'lib/buildizer/ci/base.rb', line 30

def setup!
  raise
end