.gitlab-ci.yml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. before_script:
  2. - bundle install
  3. - script/build/test_db_config.sh
  4. stages:
  5. - pre
  6. - test
  7. - browser
  8. rubocop:
  9. stage: pre
  10. tags:
  11. - core
  12. script:
  13. - bundle exec rubocop
  14. coffeelint:
  15. stage: pre
  16. tags:
  17. - core
  18. script:
  19. - coffeelint app/
  20. job_unit:
  21. stage: test
  22. tags:
  23. - core
  24. script:
  25. - export RAILS_ENV=test
  26. - rake db:drop;
  27. - rake db:create
  28. - rake db:migrate
  29. - rake db:seed
  30. - rake test:units
  31. - rake test:controllers
  32. job_integration_email_helper:
  33. stage: test
  34. tags:
  35. - core
  36. script:
  37. - export RAILS_ENV=test
  38. - rake db:drop;
  39. - rake db:create
  40. - rake db:migrate
  41. - ruby -I test/ test/integration/email_helper_test.rb
  42. job_integration_twitter:
  43. stage: test
  44. tags:
  45. - core
  46. script:
  47. - export RAILS_ENV=test
  48. - rake db:drop;
  49. - rake db:create
  50. - rake db:migrate
  51. - rake db:seed
  52. - ruby -I test/ test/integration/twitter_test.rb
  53. job_integration_geo_ip:
  54. stage: test
  55. tags:
  56. - core
  57. script:
  58. - export RAILS_ENV=test
  59. - rake db:drop;
  60. - rake db:create
  61. - rake db:migrate
  62. - ruby -I test/ test/integration/geo_ip_test.rb
  63. job_integration_geo_location:
  64. stage: test
  65. tags:
  66. - core
  67. script:
  68. - export RAILS_ENV=test
  69. - rake db:drop;
  70. - rake db:create
  71. - rake db:migrate
  72. - ruby -I test/ test/integration/geo_location_test.rb
  73. job_integration_geo_calendar:
  74. stage: test
  75. tags:
  76. - core
  77. script:
  78. - export RAILS_ENV=test
  79. - rake db:drop;
  80. - rake db:create
  81. - rake db:migrate
  82. - ruby -I test/ test/integration/geo_calendar_test.rb
  83. job_integration_user_agent:
  84. stage: test
  85. tags:
  86. - core
  87. script:
  88. - export RAILS_ENV=test
  89. - rake db:drop;
  90. - rake db:create
  91. - rake db:migrate
  92. - ruby -I test/ test/integration/user_agent_test.rb
  93. job_integration_es:
  94. stage: test
  95. tags:
  96. - core
  97. script:
  98. - export RAILS_ENV=test
  99. - export ES_INDEX="estest.local_zammad_"$RNAME
  100. - export ES_URL="http://localhost:9200"
  101. - rake db:drop;
  102. - rake db:create
  103. - rake db:migrate
  104. - ruby -I test/ test/integration/elasticsearch_test.rb
  105. - ruby -I test/ test/controllers/search_controller_test.rb
  106. - ruby -I test/ test/integration/report_test.rb
  107. job_integration_zendesk:
  108. stage: test
  109. tags:
  110. - core
  111. script:
  112. - export RAILS_ENV=test
  113. - rake db:drop;
  114. - rake db:create
  115. - rake db:migrate
  116. - ruby -I test/ test/integration/zendesk_import_test.rb
  117. job_integration_otrs_5:
  118. stage: test
  119. tags:
  120. - core
  121. script:
  122. - export RAILS_ENV=test
  123. - export IMPORT_OTRS_ENDPOINT="http://vz599.demo.znuny.com/otrs/public.pl?Action=ZammadMigrator"
  124. - rake db:drop;
  125. - rake db:create
  126. - rake db:migrate
  127. - ruby -I test/ test/integration/otrs_import_test.rb
  128. job_integration_otrs_4:
  129. stage: test
  130. tags:
  131. - core
  132. script:
  133. - export RAILS_ENV=test
  134. - export IMPORT_OTRS_ENDPOINT="http://vz383.demo.znuny.com/otrs/public.pl?Action=ZammadMigrator"
  135. - rake db:drop;
  136. - rake db:create
  137. - rake db:migrate
  138. - ruby -I test/ test/integration/otrs_import_test.rb
  139. job_integration_otrs_33:
  140. stage: test
  141. tags:
  142. - core
  143. script:
  144. - export RAILS_ENV=test
  145. - export IMPORT_OTRS_ENDPOINT="http://vz305.demo.znuny.com/otrs/public.pl?Action=ZammadMigrator"
  146. - rake db:drop;
  147. - rake db:create
  148. - rake db:migrate
  149. - ruby -I test/ test/integration/otrs_import_test.rb
  150. job_integration_otrs_32:
  151. stage: test
  152. tags:
  153. - core
  154. script:
  155. - export RAILS_ENV=test
  156. - export IMPORT_OTRS_ENDPOINT="http://vz382.demo.znuny.com/otrs/public.pl?Action=ZammadMigrator"
  157. - rake db:drop;
  158. - rake db:create
  159. - rake db:migrate
  160. - ruby -I test/ test/integration/otrs_import_test.rb
  161. job_integration_otrs_31:
  162. stage: test
  163. tags:
  164. - core
  165. script:
  166. - export RAILS_ENV=test
  167. - export IMPORT_OTRS_ENDPOINT="http://vz381.demo.znuny.com/otrs/public.pl?Action=ZammadMigrator"
  168. - rake db:drop;
  169. - rake db:create
  170. - rake db:migrate
  171. - ruby -I test/ test/integration/otrs_import_test.rb
  172. job_integration_twitter_ff:
  173. stage: browser
  174. tags:
  175. - browser-ff
  176. - twitter
  177. script:
  178. - export BROWSER_PORT=3041
  179. - export WS_PORT=3042
  180. - export BROWSER_URL=http://$IP:$BROWSER_PORT
  181. - RAILS_ENV=test rake db:create
  182. - cp contrib/auto_wizard_test.json auto_wizard.json
  183. - script/bootstrap.sh
  184. - rake assets:precompile
  185. - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  186. - ruby -I test/ test/integration/twitter_browser_test.rb || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1
  187. - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  188. job_integration_facebook_ff:
  189. stage: browser
  190. tags:
  191. - browser-ff
  192. - facebook
  193. script:
  194. - export BROWSER_PORT=3051
  195. - export WS_PORT=3052
  196. - export BROWSER_URL=http://$IP:$BROWSER_PORT
  197. - RAILS_ENV=test rake db:create
  198. - cp contrib/auto_wizard_test.json auto_wizard.json
  199. - script/bootstrap.sh
  200. - rake assets:precompile
  201. - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  202. - ruby -I test/ test/integration/facebook_browser_test.rb || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1
  203. - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  204. job_integration_autowizard_ff:
  205. stage: browser
  206. tags:
  207. - browser-ff
  208. script:
  209. - export BROWSER_PORT=3001
  210. - export WS_PORT=3002
  211. - export BROWSER_URL=http://$IP:$BROWSER_PORT
  212. - RAILS_ENV=test rake db:create
  213. - cp contrib/auto_wizard_example.json auto_wizard.json
  214. - script/bootstrap.sh
  215. - rake assets:precompile
  216. - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  217. - ruby -I test/ test/integration/auto_wizard_test.rb || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1
  218. - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  219. job_integration_browser_ff_1:
  220. stage: browser
  221. tags:
  222. - browser-ff
  223. script:
  224. - export BROWSER_PORT=3011
  225. - export WS_PORT=3012
  226. - export BROWSER_URL=http://$IP:$BROWSER_PORT
  227. - unset MAILBOX_AUTO1
  228. - unset MAILBOX_AUTO2
  229. - unset MAILBOX_MANUAL1
  230. - unset MAILBOX_MANUAL2
  231. - script/build/test_slice_tests.sh 1
  232. - RAILS_ENV=test rake db:create
  233. - script/bootstrap.sh
  234. - rake assets:precompile
  235. - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  236. - rake test:browser || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1
  237. - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  238. job_integration_browser_ff_2:
  239. stage: browser
  240. tags:
  241. - browser-ff
  242. script:
  243. - export BROWSER_PORT=3021
  244. - export WS_PORT=3022
  245. - export BROWSER_URL=http://$IP:$BROWSER_PORT
  246. - unset MAILBOX_AUTO1
  247. - unset MAILBOX_AUTO2
  248. - unset MAILBOX_MANUAL1
  249. - unset MAILBOX_MANUAL2
  250. - script/build/test_slice_tests.sh 2
  251. - RAILS_ENV=test rake db:create
  252. - script/bootstrap.sh
  253. - rake assets:precompile
  254. - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  255. - rake test:browser || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1
  256. - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  257. job_integration_browser_ff_3:
  258. stage: browser
  259. tags:
  260. - browser-ff
  261. script:
  262. - export BROWSER_PORT=3031
  263. - export WS_PORT=3032
  264. - export BROWSER_URL=http://$IP:$BROWSER_PORT
  265. - script/build/test_slice_tests.sh 3
  266. - RAILS_ENV=test rake db:create
  267. - script/bootstrap.sh
  268. - rake assets:precompile
  269. - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  270. - rake test:browser || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1
  271. - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  272. job_integration_autowizard_chrome:
  273. stage: browser
  274. tags:
  275. - browser-chrome
  276. script:
  277. - export BROWSER_PORT=4001
  278. - export WS_PORT=4002
  279. - export BROWSER_URL=http://$IP:$BROWSER_PORT
  280. - RAILS_ENV=test rake db:create
  281. - cp contrib/auto_wizard_example.json auto_wizard.json
  282. - script/bootstrap.sh
  283. - rake assets:precompile
  284. - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  285. - ruby -I test/ test/integration/auto_wizard_test.rb || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1
  286. - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  287. job_integration_browser_chrome_1:
  288. stage: browser
  289. tags:
  290. - browser-chrome
  291. script:
  292. - export BROWSER_PORT=4011
  293. - export WS_PORT=4012
  294. - export BROWSER_URL=http://$IP:$BROWSER_PORT
  295. - unset MAILBOX_AUTO1
  296. - unset MAILBOX_AUTO2
  297. - unset MAILBOX_MANUAL1
  298. - unset MAILBOX_MANUAL2
  299. - script/build/test_slice_tests.sh 1
  300. - RAILS_ENV=test rake db:create
  301. - script/bootstrap.sh
  302. - rake assets:precompile
  303. - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  304. - rake test:browser || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1
  305. - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  306. job_integration_browser_chrome_2:
  307. stage: browser
  308. tags:
  309. - browser-chrome
  310. script:
  311. - export BROWSER_PORT=4021
  312. - export WS_PORT=4022
  313. - export BROWSER_URL=http://$IP:$BROWSER_PORT
  314. - unset MAILBOX_AUTO1
  315. - unset MAILBOX_AUTO2
  316. - unset MAILBOX_MANUAL1
  317. - unset MAILBOX_MANUAL2
  318. - script/build/test_slice_tests.sh 2
  319. - RAILS_ENV=test rake db:create
  320. - script/bootstrap.sh
  321. - rake assets:precompile
  322. - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  323. - rake test:browser || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1
  324. - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  325. job_integration_browser_chrome_3:
  326. stage: browser
  327. tags:
  328. - browser-chrome
  329. script:
  330. - export BROWSER_PORT=4031
  331. - export WS_PORT=4032
  332. - export BROWSER_URL=http://$IP:$BROWSER_PORT
  333. - unset MAILBOX_AUTO1
  334. - unset MAILBOX_AUTO2
  335. - unset MAILBOX_MANUAL1
  336. - unset MAILBOX_MANUAL2
  337. - script/build/test_slice_tests.sh 3
  338. - RAILS_ENV=test rake db:create
  339. - script/bootstrap.sh
  340. - rake assets:precompile
  341. - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  342. - rake test:browser || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1
  343. - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  344. job_integration_twitter_chrome:
  345. stage: browser
  346. tags:
  347. - browser-chrome
  348. - twitter
  349. script:
  350. - export BROWSER_PORT=4041
  351. - export WS_PORT=4042
  352. - export BROWSER_URL=http://$IP:$BROWSER_PORT
  353. - RAILS_ENV=test rake db:create
  354. - cp contrib/auto_wizard_test.json auto_wizard.json
  355. - script/bootstrap.sh
  356. - rake assets:precompile
  357. - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  358. - ruby -I test/ test/integration/twitter_browser_test.rb || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1
  359. - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  360. job_integration_facebook_chrome:
  361. stage: browser
  362. tags:
  363. - browser-chrome
  364. - facebook
  365. script:
  366. - export BROWSER_PORT=4051
  367. - export WS_PORT=4052
  368. - export BROWSER_URL=http://$IP:$BROWSER_PORT
  369. - RAILS_ENV=test rake db:create
  370. - cp contrib/auto_wizard_test.json auto_wizard.json
  371. - script/bootstrap.sh
  372. - rake assets:precompile
  373. - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT
  374. - ruby -I test/ test/integration/facebook_browser_test.rb || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1
  375. - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT