Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby1.9.1
# http://gist.github.com/144861
#
# Requirements:
# * ruote-2.1.10 or later
# * ruote-amqp-2.1.10 or later
# * daemon-kit-0.1.8rc3 or later
#
require 'rubygems'
require 'bundler'
#!/usr/bin/env ruby1.9.1
# http://gist.github.com/144861
#
# Requirements:
# * ruote-2.1.10 or later
# * ruote-amqp-2.1.10 or later
# * daemon-kit-0.1.8rc3 or later
#
$:.push "./ruote-amqp/lib"
$:.push "./ruote/lib"
execve("./run_engine.rb", ["./run_engine.rb"], [/* 43 vars */]) = 0
brk(0) = 0x9180000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb77ae000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=172486, ...}) = 0
mmap2(NULL, 172486, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7783000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
set_robust_list(0xb76babe0, 0xc) = 0
futex(0x411860a4, FUTEX_CMP_REQUEUE_PRIVATE, 1, 2147483647, 0x41186080, 2) = 1
gettimeofday({1276757922, 495502}, NULL) = 0
futex(0x41186080, FUTEX_WAKE_PRIVATE, 1) = 0
clock_gettime(CLOCK_REALTIME, {1276757922, 495625421}) = 0
futex(0x411860a4, FUTEX_WAIT_PRIVATE, 3, {0, 9876579}) = -1 ETIMEDOUT (Connection timed out)
gettimeofday({1276757922, 505717}, NULL) = 0
futex(0x41186080, FUTEX_WAKE_PRIVATE, 1) = 0
clock_gettime(CLOCK_REALTIME, {1276757922, 505799581}) = 0
futex(0x411860a4, FUTEX_WAIT_PRIVATE, 5, {0, 9917419}) = -1 ETIMEDOUT (Connection timed out)
clock_gettime(CLOCK_REALTIME, {1276757928, 212448187}) = 0
clock_gettime(CLOCK_REALTIME, {1276757928, 212722018}) = 0
stat64("/tmp/work/expressions/be/0!!20100617-bitzuharube.json", 0xb7575d10) = -1 ENOENT (No such file or directory)
stat64("/tmp/work/expressions/be", 0xb7575d10) = -1 ENOENT (No such file or directory)
mkdir("/tmp/work/expressions/be", 0777) = 0
stat64("/tmp/work/expressions/be/0!!20100617-bitzuharube.json", 0xb7575d10) = -1 ENOENT (No such file or directory)
utimensat(AT_FDCWD, "/tmp/work/expressions/be/0!!20100617-bitzuharube.json", NULL, 0) = -1 ENOENT (No such file or directory)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
open("/tmp/work/expressions/be/0!!20100617-bitzuharube.json", O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE, 0666) = 6
ioctl(6, SNDCTL_TMR_TIMEBASE or TCGETS, 0xb7575518) = -1 ENOTTY (Inappropriate ioctl for device)
david@ash:/maemo/devel/obs/boss/demo$ ruby1.9.1 -rtracer -e "Thread.new { puts 'x' }"
#0:ruby1.9.1:0:Kernel:<: ?
#0:-e:1::-: Thread.new { puts 'x' }
#0:-e:1:Thread:>: Thread.new { puts 'x' }
#0:-e:1:Thread:>: Thread.new { puts 'x' }
#0:-e:1:Thread:<: Thread.new { puts 'x' }
x#0:-e:1:Thread:<: Thread.new { puts 'x' }
kernel squeeze-installer/i386/linux
append initrd=squeeze-installer/i386/initrd.gz auto url=192.168.14.201 classes=xen3;loc/gb DEBCONF_DEBUG=5
The way this works is that:
*
if the URL is missing a protocol, http is assumed,
*
if the hostname section contains no periods, it has the domain derived from DHCP appended to it, and
*
source "http://rubygems.org"
gem 'daemon-kit', :git =>"git://github.com/kennethkalmer/daemon-kit.git"
gem 'amqp', :git =>"git://github.com/tmm1/amqp.git"
gem 'ruote', :path => "../ruote/ruote"
gem 'ruote-amqp', :path => "../ruote/ruote-amqp"
gem 'rspec'
gem 'eventmachine'
gem 'json'
ci_process = Ruote.process_definition :name => 'Ci Process' do
sequence do
developer
builder
kit :command => '/img/image', :queue => 'img', :reply_queue => "ruote_workitems"
_if '${f:build_ok} == YES' do
kit :command => '/cita/test', :queue => 'cita', :reply_queue => "ruote_workitems"
end
print_results
end