class Jenkins2API::Command::Build

Contains all the commands under build namespace

Public Instance Methods

logs(name, build_id) click to toggle source

Retrieve logs for a specific job and join them by newline

# File lib/commands/build.rb, line 24
def logs(name, build_id)
  puts client.build.logtext_lines(name, build_id).join("\n")
end
slave_name(name, build_id) click to toggle source

Displays the name of the slave where the build was executed

# File lib/commands/build.rb, line 11
def slave_name(name, build_id)
  slave_name = client.build.slave_name(name, build_id)
  if options[:ec2id]
    slave_name = slave_name.match(/(i-[0-9a-zA-Z]+)/)
                           .captures
                           .first
  end

  puts slave_name
end