Sha256: d9a162bfbbb9b92e93605a58b039ab1fc03ae02f06e8ce86517665ac61dd2000
Contents?: true
Size: 1000 Bytes
Versions: 2
Compression:
Stored size: 1000 Bytes
Contents
#!/usr/bin/env ruby require 'remote_syslog_logger' require_relative '../lib/gooddata' DEFAULT_BRICK = 'hello_world_brick' brick_type = ENV['BRICK_TYPE'] || DEFAULT_BRICK syslog_node = ENV['NODE_NAME'] log = RemoteSyslogLogger.new(syslog_node, 514, :program => brick_type) log.info "action=#{brick_type}_execution status=start" begin brick_pipeline = GoodData::Bricks::Pipeline.send("#{brick_type}_pipeline") params_json = ENV['BRICK_PARAMS_JSON'] params = params_json.nil? ? {} : JSON.parse(params_json) params['gooddata_ruby_commit'] = ENV['GOODDATA_RUBY_COMMIT'] || '<unknown>' params['log_directory'] = ENV['LOG_DIRECTORY'] || '/tmp/' @brick_result = brick_pipeline.call(params) log.info "action=#{brick_type}_execution status=finished" rescue NoMethodError => e log.info "action=#{brick_type}_execution status=error Invalid brick type '#{brick_type}', #{e.message}" raise e rescue => e log.info "action=#{brick_type}_execution status=error #{e.message}" raise e end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gooddata-1.3.1-java | bin/run_brick.rb |
gooddata-1.3.1 | bin/run_brick.rb |