Example #1
0
 def __init__(self, factory, options, **kwargs):
   super(BuildSpinCommand, self).__init__(
     factory, options, source_repository_names=['spin'], **kwargs)
   self.__gcs_uploader = SpinGcsUploader(options)
   self.__build_version = None  # recorded after build
   bom_contents = BomSourceCodeManager.load_bom(options)
   gate_entry = bom_contents.get('services', {}).get('gate', {})
   if not gate_entry:
     raise_and_log_error(
         ConfigError('No gate service entry found in bom {}'.format(bom_contents)))
   self.__gate_version = gate_entry['version']
Example #2
0
 def __init__(self, factory, options, **kwargs):
   super(BuildSpinCommand, self).__init__(
     factory, options, source_repository_names=SPIN_REPOSITORY_NAMES, **kwargs)
   options_copy = copy.copy(options)
   self.__gcs_uploader = SpinGcsUploader(options)
   self.__scm = BranchSourceCodeManager(options_copy, self.get_input_dir())
   self.__build_version = None  # recorded after build
   bom_contents = BomSourceCodeManager.load_bom(options)
   gate_entry = bom_contents.get('services', {}).get('gate', {})
   if not gate_entry:
     raise_and_log_error(
         ConfigError('No gate service entry found in bom {}'.format(bom_contents)))
   self.__gate_version = gate_entry['version']
Example #3
0
  def __init__(self, factory, options, **kwargs):
    options_copy = copy.copy(options)
    options_copy.git_branch = 'master'
    options_copy.github_hostname = 'github.com'
    super(PublishSpinCommand, self).__init__(factory, options_copy, **kwargs)

    check_options_set(options, ['spin_version']) # Ensure we have a version to promote.
    bom_contents = BomSourceCodeManager.load_bom(options_copy)
    gate_entry = bom_contents.get('services', {}).get('gate', {})
    if not gate_entry:
      raise_and_log_error(
          ConfigError('No gate service entry found in bom {}'.format(bom_contents)))

    self.__spinnaker_version = options.bom_version or bom_contents['version']
    self.__gate_version = gate_entry['version']
    self.__stable_version = None # Set after promote_spin.
    self.__no_changes = False # Set after promote_spin.
    self.__scm = BranchSourceCodeManager(options_copy, self.get_input_dir())
    self.__gcs_uploader = SpinGcsUploader(options)
Example #4
0
  def __init__(self, factory, options, **kwargs):
    options_copy = copy.copy(options)
    options_copy.git_branch = 'master'
    options_copy.github_hostname = 'github.com'
    super(PublishSpinCommand, self).__init__(factory, options_copy, **kwargs)

    check_options_set(options, ['spin_version']) # Ensure we have a version to promote.
    bom_contents = BomSourceCodeManager.load_bom(options_copy)
    gate_entry = bom_contents.get('services', {}).get('gate', {})
    if not gate_entry:
      raise_and_log_error(
          ConfigError('No gate service entry found in bom {}'.format(bom_contents)))

    self.__spinnaker_version = options.bom_version or bom_contents['version']
    self.__gate_version = gate_entry['version']
    self.__stable_version = None # Set after promote_spin.
    self.__no_changes = False # Set after promote_spin.
    self.__scm = BranchSourceCodeManager(options_copy, self.get_input_dir())
    self.__gcs_uploader = SpinGcsUploader(options)