Class: Buildizer::Ci::Base
- Inherits:
-
Object
- Object
- Buildizer::Ci::Base
- Defined in:
- lib/buildizer/ci/base.rb
Instance Attribute Summary collapse
-
#packager ⇒ Object
readonly
Returns the value of attribute packager.
Class Method Summary collapse
Instance Method Summary collapse
- #_git_tag ⇒ Object
- #buildizer_install_instructions(master: nil) ⇒ Object
- #ci_name ⇒ Object
- #conf ⇒ Object
- #conf_file_name ⇒ Object
- #conf_path ⇒ Object
- #configuration_actual? ⇒ Boolean
- #docker_cache_setup! ⇒ Object
- #git_tag ⇒ Object
-
#initialize(packager) ⇒ Base
constructor
A new instance of Base.
- #package_cloud_setup! ⇒ Object
- #setup! ⇒ Object
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
#packager ⇒ Object (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_name ⇒ Object
70 71 72 |
# File 'lib/buildizer/ci/base.rb', line 70 def ci_name raise end |
Instance Method Details
#_git_tag ⇒ Object
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_name ⇒ Object
26 27 28 |
# File 'lib/buildizer/ci/base.rb', line 26 def ci_name self.class.ci_name end |
#conf ⇒ Object
14 15 16 |
# File 'lib/buildizer/ci/base.rb', line 14 def conf @conf ||= conf_path.load_yaml end |
#conf_file_name ⇒ Object
22 23 24 |
# File 'lib/buildizer/ci/base.rb', line 22 def conf_file_name ".#{ci_name}.yml" end |
#conf_path ⇒ Object
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
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_tag ⇒ Object
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 |