Skip to content

Instantly share code, notes, and snippets.

Created March 14, 2013 23:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5166219 to your computer and use it in GitHub Desktop.
Save anonymous/5166219 to your computer and use it in GitHub Desktop.
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