Class: Dapp::Dimg::Build::Stage::GABase
- Defined in:
- lib/dapp/dimg/build/stage/ga_base.rb
Direct Known Subclasses
GAArchive, GALatestPatch, Install::GAPostInstallPatch, Install::GAPreInstallPatch, Setup::GAPostSetupPatch, Setup::GAPreSetupPatch
Instance Attribute Summary collapse
-
#next_g_a_stage ⇒ Object
Returns the value of attribute next_g_a_stage.
-
#prev_g_a_stage ⇒ Object
Returns the value of attribute prev_g_a_stage.
Attributes inherited from Base
#dimg, #next_stage, #prev_stage
Instance Method Summary collapse
- #dependencies_stage ⇒ Object
- #empty? ⇒ Boolean
- #layer_commit(git_artifact) ⇒ Object
- #prepare_base_git_artifacts_command(git_artifacts) ⇒ Object
- #prepare_image ⇒ Object
- #prepare_local_git_artifacts_command ⇒ Object
- #prepare_remote_git_artifacts_command ⇒ Object
Methods inherited from Base
#adding_mounts_by_type, #artifact?, #build!, #build_lock!, #builder_checksum, #config_mounts_by_type, #dependencies, #dependencies_empty?, #git_artifacts_dependencies, #image, #image_add_mounts, #image_should_be_build?, #initialize, #labels_mounts_by_type, #name, #save_in_cache!, #signature
Methods included from Mod::Logging
#log_build, #log_image_build, #log_image_build_process, #log_image_commands, #log_image_created_at, #log_image_details, #log_image_instructions, #log_image_size, #log_name, #log_name_context, #log_state, #should_be_introspected?, #should_be_quiet?
Methods included from Helper::Trivia
class_to_lowercase, #class_to_lowercase, #delete_file, #kwargs, #search_file_upward
Methods included from Helper::Sha256
#hashsum, #paths_content_hashsum, #sha256
Constructor Details
This class inherits a constructor from Dapp::Dimg::Build::Stage::Base
Instance Attribute Details
#next_g_a_stage ⇒ Object
Returns the value of attribute next_g_a_stage.
6 7 8 |
# File 'lib/dapp/dimg/build/stage/ga_base.rb', line 6 def next_g_a_stage @next_g_a_stage end |
#prev_g_a_stage ⇒ Object
Returns the value of attribute prev_g_a_stage.
6 7 8 |
# File 'lib/dapp/dimg/build/stage/ga_base.rb', line 6 def prev_g_a_stage @prev_g_a_stage end |
Instance Method Details
#dependencies_stage ⇒ Object
16 17 18 |
# File 'lib/dapp/dimg/build/stage/ga_base.rb', line 16 def dependencies_stage prev_stage end |
#empty? ⇒ Boolean
43 44 45 |
# File 'lib/dapp/dimg/build/stage/ga_base.rb', line 43 def empty? dependencies_stage.empty? end |
#layer_commit(git_artifact) ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'lib/dapp/dimg/build/stage/ga_base.rb', line 47 def layer_commit(git_artifact) commits[git_artifact] ||= begin if dependencies_stage && dependencies_stage.image.tagged? dependencies_stage.image.labels[git_artifact.full_name] else git_artifact.latest_commit end end end |
#prepare_base_git_artifacts_command(git_artifacts) ⇒ Object
39 40 41 |
# File 'lib/dapp/dimg/build/stage/ga_base.rb', line 39 def prepare_base_git_artifacts_command(git_artifacts) git_artifacts.each { |git_artifact| image.add_command git_artifact.send(apply_command_method, self) } end |
#prepare_image ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/dapp/dimg/build/stage/ga_base.rb', line 20 def prepare_image super do image.add_volumes_from dimg.dapp.gitartifact_container image.add_volume "#{dimg.tmp_path('archives')}:#{dimg.container_tmp_path('archives')}:ro" image.add_volume "#{dimg.tmp_path('patches')}:#{dimg.container_tmp_path('patches')}:ro" prepare_local_git_artifacts_command prepare_remote_git_artifacts_command end end |
#prepare_local_git_artifacts_command ⇒ Object
31 32 33 |
# File 'lib/dapp/dimg/build/stage/ga_base.rb', line 31 def prepare_local_git_artifacts_command prepare_base_git_artifacts_command(dimg.local_git_artifacts) end |
#prepare_remote_git_artifacts_command ⇒ Object
35 36 37 |
# File 'lib/dapp/dimg/build/stage/ga_base.rb', line 35 def prepare_remote_git_artifacts_command prepare_base_git_artifacts_command(dimg.remote_git_artifacts) end |