List all BuildConfigurations
345823
def list_build_configurations(page_size=200, page_index=0, sort="", q=""):
    
    data = list_build_configurations_raw(page_size, page_index, sort, q)
    if data:
        return utils.format_json_list(data)
597620
def build(config, services):
    
    filtered_services = {name: service for name, service in services.iteritems() if 'build' in service}

    _call_output('docker-compose build {}'.format(' '.join(filtered_services.iterkeys())))

    version = _get_version()

    for service_name, service_dict in filtered_services.iteritems():
        # Tag with proper version, they're already tagged latest from build
        image = service_dict['image']
        _call('docker tag {image}:latest {image}:{version}'.format(
                image=image,
                version=version
            )
        )
443214
def get_build_spec(self):
        """"""
        if BaseSpecification.BUILD not in self._data:
            return None
        return BuildConfig.from_dict(self._data[BaseSpecification.BUILD])
893350
def cmd_list(unused_conf: Config):
    """"""
    for name, builder in sorted(Plugin.builders.items()):
        if builder.func:
            print('+- {0:16s} implemented in {1.__module__}.{1.__name__}()'
                  .format(name, builder.func))
        else:
            print('+- {0:16s} loaded with no builder function'.format(name))
        for hook_name, hook_func in sorted(Plugin.get_hooks_for_builder(name)):
            print('  +- {0} hook implemented in '
                  '{1.__module__}.{1.__name__}()'
                  .format(hook_name, hook_func))
927804
def configuration(name, type)
      default_settings = default_settings_for_type(type)
      configurations = configurations_of_type(type)

      build_configuration = if name.nil?
                              configurations.first
                            else
                              configurations.detect do |c|
                                c.name == name.to_s
                              end
                            end

      if build_configuration.nil?

        name = type.to_s.capitalize if name.nil?

        build_configuration = Configuration.new(name) do |b|
          b.type = type
          b.settings.merge!(default_settings)

          yield(b) if block_given?
        end

        @configurations ||= []
        @configurations << build_configuration
      end

      build_configuration
    end
1325512
def show_matching_builds(self, builds):
        """"""
        self.logger.info('Found %s build%s: %s' % (
            len(builds),
            len(builds) > 1 and 's' or '',
            len(builds) > 10 and
            ' ... '.join([', '.join(builds[:5]), ', '.join(builds[-5:])]) or
            ', '.join(builds)))
184433
def _make_builder_configs():
  
  config_list = []
  for corruption in _CORRUPTIONS:
    for severity in range(1, 6):
      config_list.append(
          Cifar10CorruptedConfig(
              name=corruption + '_' + str(severity),
              version='0.0.1',
              description='Corruption method: ' + corruption +
              ', severity level: ' + str(severity),
              corruption_type=corruption,
              severity=severity,
          ))
  return config_list
954287
def find_or_build_all(cls, list_of_kwargs):
        
        return cls.add_all([cls.first(**kwargs) or cls.new(**kwargs)
                            for kwargs in list_of_kwargs], commit=False)
1149720
def build_status(self, _args):
        
        print('{Style.BRIGHT}Bootstraps whose core components are probably '
              'already built:{Style.RESET_ALL}'.format(Style=Out_Style))

        bootstrap_dir = join(self.ctx.build_dir, 'bootstrap_builds')
        if exists(bootstrap_dir):
            for filen in os.listdir(bootstrap_dir):
                print('    {Fore.GREEN}{Style.BRIGHT}{filen}{Style.RESET_ALL}'
                      .format(filen=filen, Fore=Out_Fore, Style=Out_Style))

        print('{Style.BRIGHT}Recipes that are probably already built:'
              '{Style.RESET_ALL}'.format(Style=Out_Style))
        other_builds_dir = join(self.ctx.build_dir, 'other_builds')
        if exists(other_builds_dir):
            for filen in sorted(os.listdir(other_builds_dir)):
                name = filen.split('-')[0]
                dependencies = filen.split('-')[1:]
                recipe_str = ('    {Style.BRIGHT}{Fore.GREEN}{name}'
                              '{Style.RESET_ALL}'.format(
                                  Style=Out_Style, name=name, Fore=Out_Fore))
                if dependencies:
                    recipe_str += (
                        ' ({Fore.BLUE}with ' + ', '.join(dependencies) +
                        '{Fore.RESET})').format(Fore=Out_Fore)
                recipe_str += '{Style.RESET_ALL}'.format(Style=Out_Style)
                print(recipe_str)
967390
def buildlist(self, enabled):
        
        choice = []
        for item in self.data:
            choice.append((item, False))
        for item in enabled:
            choice.append((item, True))
        items = [(tag, tag, sta) for (tag, sta) in choice]
        code, self.tags = self.d.buildlist(
            text=self.text, items=items, visit_items=True, item_help=False,
            title=self.title)
        if code == "ok":
            self.unicode_to_string()
            return self.ununicode
        if code in ["cancel", "esc"]:
            self.exit()
676498
function configure(build) {
  // Configure from file.
  var data = build.tryRequireNew(build.filePath);
  if (!data)
    return;
  configureBase(build, data);
  configurePaths(build, data);
  configureApiProxy(build, data);
  configurePackage(build, data);
  configureDevServer(build, data);
  configureEngine(build, data);
  configureHashids(build, data);
  configureLocales(build, data);
  configureBundles(build, data);
  configureViews(build, data);
}
226403
function enumerateBuiltInCommands(config) {
    const builtInCommandParentDirGlob = path_1.join(config.builtInCommandLocation, '/*.js');
    return globby.sync(builtInCommandParentDirGlob, { ignore: '**/*.map' });
}
774574
private List<SourceFile> getBuiltinExterns(CompilerOptions options) {
    try {
      return CommandLineRunner.getBuiltinExterns(options.getEnvironment());
    } catch (IOException e) {
      throw new BuildException(e);
    }
  }
725426
def builds(self, confs):
        """"""
        self._named_builds = {}
        self._builds = []
        for values in confs:
            if len(values) == 2:
                self._builds.append(BuildConf(values[0], values[1], {}, {}, self.reference))
            elif len(values) == 4:
                self._builds.append(BuildConf(values[0], values[1], values[2], values[3],
                                              self.reference))
            elif len(values) != 5:
                raise Exception("Invalid build configuration, has to be a tuple of "
                                "(settings, options, env_vars, build_requires, reference)")
            else:
                self._builds.append(BuildConf(*values))
770341
def update_build_configuration_set(id, **kwargs):
    
    data = update_build_configuration_set_raw(id, **kwargs)
    if data:
        return utils.format_json(data)
1256227
def do_list():
    
    dirs =  os.walk(CONFIG_ROOT).next()[1]
    if dirs:
        print "List of available configurations:\n"
        for d in dirs:
            print "  * {}".format(d)
    else:
        print "No configurations available."
1253133
def list_(runas=None):
    '''
    
    '''
    ret = []
    output = _rbenv_exec(['install', '--list'], runas=runas)
    if output:
        for line in output.splitlines():
            if line == 'Available versions:':
                continue
            ret.append(line.strip())
    return ret