Guest User

Untitled

a guest
Jun 18th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1.  
  2. Ruote.process_definition 'handle_sr' do
  3.  
  4. sequence do
  5.  
  6. request_handler :action => 'review'
  7.  
  8. cursor :break_if => '${build_status} != SUCCESS' do
  9. check_process
  10. check_quality
  11. end
  12.  
  13. sequence :if => '${build_status} != SUCCESS' do
  14. request_handler :action => 'reject'
  15. notify
  16. cancel_process # process terminates
  17. end
  18.  
  19. with_OBS_ticket do
  20. build_packages
  21. listen :to => 'built_${project}'
  22. build :if => '${build_status} == SUCCESS'
  23. do_revert :if => '${build_status} != SUCCESS'
  24. end
  25. end
  26.  
  27. define 'build' do
  28. sequence do
  29. build_ks
  30. build_image
  31. test_image
  32. do_updates :if => '${build_status} == SUCCESS'
  33. end
  34. end
  35.  
  36. define 'do_updates' do
  37. sequence do
  38. iterator :on_field => 'packages', :to_field => 'package' do
  39. sequence do
  40. get_changelog
  41. concurrence do
  42. bz
  43. swpro
  44. revs_update
  45. end
  46. end
  47. end
  48. request_handler :action => 'accept'
  49. notify :msg => 'Promoted pkg:${package} tested successfully in Trunk'
  50. end
  51. end
  52.  
  53. define 'do_revert' do
  54. sequence do
  55. revert
  56. listen :to => 'built_${project}'
  57. end
  58. end
  59.  
  60. define 'with_OBS_ticket' do
  61. sequence do
  62. get_OBS_ticket
  63. apply
  64. release_OBS_ticket
  65. end
  66. end
  67. end
Add Comment
Please, Sign In to add comment