Skip to content

Instantly share code, notes, and snippets.

/iterations.rb

Created Mar 14, 2013
Embed
What would you like to do?
iterator :on_field => 'ev.actions', :to => 'v:action' do
sequence do
_if :test => '${v:action.type} == "submit"' do
sequence do
_if :test => '${v:action.sourceproject} not in ${v:sourceprojects}' do
do_wait_for_build :wait_for => '${v:action.sourceproject}'
end
inc 'v:sourceprojects', :val => '${v:action.sourceproject}'
end
end
end
end
# simpler:
iterator :on_field => 'ev.actions', :to => 'v:action' do
_if :test => '${v:action.type} == "submit"' do
sequence do
_if :test => '${v:action.sourceproject} not in ${v:sourceprojects}' do
do_wait_for_build :wait_for => '${v:action.sourceproject}'
end
inc 'v:sourceprojects', :val => '${v:action.sourceproject}'
end
end
end
# simpler:
iterator :on_field => 'ev.actions', :to => 'v:action' do
sequence :if => '${v:action.type} == "submit"' do
_if :test => '${v:action.sourceproject} not in ${v:sourceprojects}' do
do_wait_for_build :wait_for => '${v:action.sourceproject}'
end
inc 'v:sourceprojects', :val => '${v:action.sourceproject}'
end
end
# simpler:
iterator :on_field => 'ev.actions', :to => 'v:action' do
sequence :if => '${v:action.type} == "submit"' do
do_wait_for_build :wait_for => '${v:action.sourceproject}' :if => '${v:action.sourceproject} not in ${v:sourceprojects}'
inc 'v:sourceprojects', :val => '${v:action.sourceproject}'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.