function build(mode, system, cdef, out, cb) {
    _containers.getHandler(system, cdef.type, function(err, container) {
      if (err) { return cb(err); }
      if (!container) {
        err = new Error('no matching container available for type: ' + cdef.type);
        logger.error(err.message);
        return cb(err);
      }

      if (container.build) {
        out.progress('--> executing container specific build for ' +  cdef.id);
        logger.info({ containerDefinition: cdef.id }, 'executing container specific build');
        container.build(mode, system, cdef, out, function(err, specific) {
          if (err) { logger.error(err); out.stdout(err); return cb(err); }

          out.progress('--> ' + cdef.id + ' built');
          logger.info({ containerDefinition: cdef.id }, 'built');
          cb(err);
        });
      } else {
        out.progress('--> no need to build ' + cdef.id);
        cb(null, {});
      }
    });
  }
function build(mode, system, cdef, out, cb) {
    _containers.getHandler(system, cdef.type, function(err, container) {
      if (err) { return cb(err); }
      if (!container) {
        err = new Error('no matching container available for type: ' + cdef.type);
        logger.error(err.message);
        return cb(err);
      }

      if (container.build) {
        out.progress('--> executing container specific build for ' +  cdef.id);
        logger.info({ containerDefinition: cdef.id }, 'executing container specific build');
        container.build(mode, system, cdef, out, function(err, specific) {
          if (err) { logger.error(err); out.stdout(err); return cb(err); }

          out.progress('--> ' + cdef.id + ' built');
          logger.info({ containerDefinition: cdef.id }, 'built');
          cb(err);
        });
      } else {
        out.progress('--> no need to build ' + cdef.id);
        cb(null, {});
      }
    });
  }
function build ( mode , system , cdef , out , cb ) { _containers . getHandler ( system , cdef . type , function ( err , container ) { if ( err ) { return cb ( err ) ; } if ( ! container ) { err = new Error ( 'no matching container available for type: ' + cdef . type ) ; logger . error ( err . message ) ; return cb ( err ) ; } if ( container . build ) { out . progress ( '--> executing container specific build for ' + cdef . id ) ; logger . info ( { containerDefinition : cdef . id } , 'executing container specific build' ) ; container . build ( mode , system , cdef , out , function ( err , specific ) { if ( err ) { logger . error ( err ) ; out . stdout ( err ) ; return cb ( err ) ; } out . progress ( '--> ' + cdef . id + ' built' ) ; logger . info ( { containerDefinition : cdef . id } , 'built' ) ; cb ( err ) ; } ) ; } else { out . progress ( '--> no need to build ' + cdef . id ) ; cb ( null , { } ) ; } } ) ; }
Build the container and update all instantiations of the container
with the new speicific block and replace identifiers for new uuids
Build the container and update all instantiations of the container with the new speicific block and replace identifiers for new uuids