diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 141f56096..82d440433 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,23 +8,24 @@ before_script: stages: - pre - test + - build - browser -rubocop: +pre:rubocop: stage: pre tags: - core script: - bundle exec rubocop -coffeelint: +pre:coffeelint: stage: pre tags: - core script: - coffeelint app/ -bundle-audit: +pre:bundle-audit: stage: pre tags: - core @@ -33,7 +34,7 @@ bundle-audit: - bundle-audit update - bundle-audit -job_unit_mysql: +test:unit:mysql: stage: test tags: - core @@ -47,7 +48,7 @@ job_unit_mysql: - rake test:controllers - rake db:drop -job_unit_postgresql: +test:unit:postgresql: stage: test tags: - core @@ -61,7 +62,7 @@ job_unit_postgresql: - rake test:controllers - rake db:drop -job_integration_email_helper: +test:integration:email_helper: stage: test tags: - core @@ -72,7 +73,7 @@ job_integration_email_helper: - ruby -I test/ test/integration/email_helper_test.rb - rake db:drop -job_integration_twitter: +test:integration:twitter: stage: test tags: - core @@ -86,7 +87,7 @@ job_integration_twitter: - rake db:drop allow_failure: true -job_integration_facebook: +test:integration:facebook: stage: test tags: - core @@ -99,7 +100,7 @@ job_integration_facebook: - rake db:drop allow_failure: true -job_integration_geo_ip: +test:integration:geo_ip: stage: test tags: - core @@ -110,7 +111,7 @@ job_integration_geo_ip: - ruby -I test/ test/integration/geo_ip_test.rb - rake db:drop -job_integration_geo_location: +test:integration:geo_location: stage: test tags: - core @@ -121,7 +122,7 @@ job_integration_geo_location: - ruby -I test/ test/integration/geo_location_test.rb - rake db:drop -job_integration_geo_calendar: +test:integration:geo_calendar: stage: test tags: - core @@ -132,7 +133,7 @@ job_integration_geo_calendar: - ruby -I test/ test/integration/geo_calendar_test.rb - rake db:drop -job_integration_user_agent: +test:integration:user_agent: stage: test tags: - core @@ -143,7 +144,7 @@ job_integration_user_agent: - ruby -I test/ test/integration/user_agent_test.rb - rake db:drop -job_integration_slack: +test:integration:slack: stage: test tags: - core @@ -156,7 +157,7 @@ job_integration_slack: - ruby -I test test/integration/slack_test.rb - rake db:drop -job_integration_clearbit: +test:integration:clearbit: stage: test tags: - core @@ -167,7 +168,7 @@ job_integration_clearbit: - ruby -I test test/integration/clearbit_test.rb - rake db:drop -job_integration_sipgate: +test:integration:sipgate: stage: test tags: - core @@ -178,7 +179,7 @@ job_integration_sipgate: - ruby -I test test/integration/sipgate_controller_test.rb - rake db:drop -job_integration_es_mysql: +test:integration:es_mysql: stage: test tags: - core @@ -194,7 +195,7 @@ job_integration_es_mysql: - ruby -I test/ test/integration/report_test.rb - rake db:drop -job_integration_es_postgresql: +test:integration:es_postgresql: stage: test tags: - core @@ -210,7 +211,7 @@ job_integration_es_postgresql: - ruby -I test/ test/integration/report_test.rb - rake db:drop -job_integration_zendesk_mysql: +test:integration:zendesk_mysql: stage: test tags: - core @@ -222,7 +223,7 @@ job_integration_zendesk_mysql: - ruby -I test/ test/integration/zendesk_import_test.rb - rake db:drop -job_integration_zendesk_postgresql: +test:integration:zendesk_postgresql: stage: test tags: - core @@ -234,7 +235,7 @@ job_integration_zendesk_postgresql: - ruby -I test/ test/integration/zendesk_import_test.rb - rake db:drop -job_integration_otrs_5_mysql: +test:integration:otrs_5_mysql: stage: test tags: - core @@ -247,7 +248,7 @@ job_integration_otrs_5_mysql: - ruby -I test/ test/integration/otrs_import_test.rb - rake db:drop -job_integration_otrs_5_postgresql: +test:integration:otrs_5_postgresql: stage: test tags: - core @@ -260,7 +261,7 @@ job_integration_otrs_5_postgresql: - ruby -I test/ test/integration/otrs_import_test.rb - rake db:drop -job_integration_otrs_4: +test:integration:otrs_4: stage: test tags: - core @@ -272,7 +273,7 @@ job_integration_otrs_4: - ruby -I test/ test/integration/otrs_import_test.rb - rake db:drop -job_integration_otrs_33: +test:integration:otrs_33: stage: test tags: - core @@ -284,7 +285,7 @@ job_integration_otrs_33: - ruby -I test/ test/integration/otrs_import_test.rb - rake db:drop -job_integration_otrs_32: +test:integration:otrs_32: stage: test tags: - core @@ -296,7 +297,7 @@ job_integration_otrs_32: - ruby -I test/ test/integration/otrs_import_test.rb - rake db:drop -job_integration_otrs_31: +test:integration:otrs_31: stage: test tags: - core @@ -308,8 +309,25 @@ job_integration_otrs_31: - ruby -I test/ test/integration/otrs_import_test.rb - rake db:drop -job_integration_twitter_ff: +browser:build: + stage: build + tags: + - core + script: + - export RAILS_ENV=production + - rake db:drop; + - rake db:create + - rake db:migrate + - rake assets:precompile + - rake db:drop + artifacts: + paths: + - public/assets/application-* + +test:browser:twitter_ff: stage: browser + dependencies: + - browser:build tags: - browser-ff - twitter @@ -318,13 +336,14 @@ job_integration_twitter_ff: - RAILS_ENV=test rake db:create - cp contrib/auto_wizard_test.json auto_wizard.json - script/bootstrap.sh - - rake assets:precompile - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT - ruby -I test/ test/integration/twitter_browser_test.rb || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT -job_integration_facebook_ff: +test:browser:facebook_ff: stage: browser + dependencies: + - browser:build tags: - browser-ff - facebook @@ -333,13 +352,14 @@ job_integration_facebook_ff: - RAILS_ENV=test rake db:create - cp contrib/auto_wizard_test.json auto_wizard.json - script/bootstrap.sh - - rake assets:precompile - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT - ruby -I test/ test/integration/facebook_browser_test.rb || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT -job_integration_autowizard_ff: +test:browser:autowizard_ff: stage: browser + dependencies: + - browser:build tags: - browser-ff script: @@ -347,13 +367,14 @@ job_integration_autowizard_ff: - RAILS_ENV=test rake db:create - cp contrib/auto_wizard_example.json auto_wizard.json - script/bootstrap.sh - - rake assets:precompile - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT - ruby -I test/ test/integration/auto_wizard_test.rb || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT -job_integration_browser_ff_1_mysql: +test:browser:core:ff_1_mysql: stage: browser + dependencies: + - browser:build tags: - browser-ff - mysql @@ -366,13 +387,14 @@ job_integration_browser_ff_1_mysql: - script/build/test_slice_tests.sh 1 - RAILS_ENV=test rake db:create - script/bootstrap.sh - - rake assets:precompile - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT - rake test:browser || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT -job_integration_browser_ff_2_mysql: +test:browser:core:ff_2_mysql: stage: browser + dependencies: + - browser:build tags: - browser-ff - mysql @@ -385,13 +407,14 @@ job_integration_browser_ff_2_mysql: - script/build/test_slice_tests.sh 2 - RAILS_ENV=test rake db:create - script/bootstrap.sh - - rake assets:precompile - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT - rake test:browser || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT -job_integration_browser_ff_3_mysql: +test:browser:core:ff_3_mysql: stage: browser + dependencies: + - browser:build tags: - browser-ff - mysql @@ -400,13 +423,14 @@ job_integration_browser_ff_3_mysql: - script/build/test_slice_tests.sh 3 - RAILS_ENV=test rake db:create - script/bootstrap.sh - - rake assets:precompile - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT - rake test:browser || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT -job_integration_browser_ff_1_postgresql: +test:browser:core:ff_1_postgresql: stage: browser + dependencies: + - browser:build tags: - browser-ff - postgresql @@ -419,13 +443,14 @@ job_integration_browser_ff_1_postgresql: - script/build/test_slice_tests.sh 1 - RAILS_ENV=test rake db:create - script/bootstrap.sh - - rake assets:precompile - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT - rake test:browser || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT -job_integration_browser_ff_2_postgresql: +test:browser:core:ff_2_postgresql: stage: browser + dependencies: + - browser:build tags: - browser-ff - postgresql @@ -438,13 +463,14 @@ job_integration_browser_ff_2_postgresql: - script/build/test_slice_tests.sh 2 - RAILS_ENV=test rake db:create - script/bootstrap.sh - - rake assets:precompile - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT - rake test:browser || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT -job_integration_browser_ff_3_postgresql: +test:browser:core:ff_3_postgresql: stage: browser + dependencies: + - browser:build tags: - browser-ff - postgresql @@ -453,13 +479,14 @@ job_integration_browser_ff_3_postgresql: - script/build/test_slice_tests.sh 3 - RAILS_ENV=test rake db:create - script/bootstrap.sh - - rake assets:precompile - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT - rake test:browser || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT -job_integration_browser_chrome_1_mysql: +test:browser:core:chrome_1_mysql: stage: browser + dependencies: + - browser:build tags: - browser-chrome - mysql @@ -472,13 +499,14 @@ job_integration_browser_chrome_1_mysql: - script/build/test_slice_tests.sh 1 - RAILS_ENV=test rake db:create - script/bootstrap.sh - - rake assets:precompile - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT - rake test:browser || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT -job_integration_browser_chrome_2_mysql: +test:browser:core:chrome_2_mysql: stage: browser + dependencies: + - browser:build tags: - browser-chrome - mysql @@ -491,13 +519,14 @@ job_integration_browser_chrome_2_mysql: - script/build/test_slice_tests.sh 2 - RAILS_ENV=test rake db:create - script/bootstrap.sh - - rake assets:precompile - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT - rake test:browser || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT -job_integration_browser_chrome_3_mysql: +test:browser:core:chrome_3_mysql: stage: browser + dependencies: + - browser:build tags: - browser-chrome - mysql @@ -510,13 +539,14 @@ job_integration_browser_chrome_3_mysql: - script/build/test_slice_tests.sh 3 - RAILS_ENV=test rake db:create - script/bootstrap.sh - - rake assets:precompile - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT - rake test:browser || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT -job_integration_browser_chrome_1_postgresql: +test:browser:core:chrome_1_postgresql: stage: browser + dependencies: + - browser:build tags: - browser-chrome - postgresql @@ -529,13 +559,14 @@ job_integration_browser_chrome_1_postgresql: - script/build/test_slice_tests.sh 1 - RAILS_ENV=test rake db:create - script/bootstrap.sh - - rake assets:precompile - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT - rake test:browser || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT -job_integration_browser_chrome_2_postgresql: +test:browser:core:chrome_2_postgresql: stage: browser + dependencies: + - browser:build tags: - browser-chrome - postgresql @@ -548,13 +579,14 @@ job_integration_browser_chrome_2_postgresql: - script/build/test_slice_tests.sh 2 - RAILS_ENV=test rake db:create - script/bootstrap.sh - - rake assets:precompile - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT - rake test:browser || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT -job_integration_browser_chrome_3_postgresql: +test:browser:core:chrome_3_postgresql: stage: browser + dependencies: + - browser:build tags: - browser-chrome - postgresql @@ -567,13 +599,14 @@ job_integration_browser_chrome_3_postgresql: - script/build/test_slice_tests.sh 3 - RAILS_ENV=test rake db:create - script/bootstrap.sh - - rake assets:precompile - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT - rake test:browser || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT -job_integration_twitter_chrome: +test:browser:integration:twitter_chrome: stage: browser + dependencies: + - browser:build tags: - browser-chrome - twitter @@ -582,13 +615,14 @@ job_integration_twitter_chrome: - RAILS_ENV=test rake db:create - cp contrib/auto_wizard_test.json auto_wizard.json - script/bootstrap.sh - - rake assets:precompile - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT - ruby -I test/ test/integration/twitter_browser_test.rb || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT -job_integration_facebook_chrome: +test:browser:integration:facebook_chrome: stage: browser + dependencies: + - browser:build tags: - browser-chrome - facebook @@ -597,26 +631,28 @@ job_integration_facebook_chrome: - RAILS_ENV=test rake db:create - cp contrib/auto_wizard_test.json auto_wizard.json - script/bootstrap.sh - - rake assets:precompile - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT - ruby -I test/ test/integration/facebook_browser_test.rb || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT -job_integration_otrs_chrome: +test:browser:integration:otrs_chrome: stage: browser + dependencies: + - browser:build tags: - browser-chrome script: - export BROWSER_URL=http://$IP:$BROWSER_PORT - RAILS_ENV=test rake db:create - script/bootstrap.sh - - rake assets:precompile - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT - ruby -I test/ test/integration/otrs_import_browser_test.rb || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT -job_integration_autowizard_chrome: +test:browser:integration:autowizard_chrome: stage: browser + dependencies: + - browser:build tags: - browser-chrome script: @@ -624,20 +660,20 @@ job_integration_autowizard_chrome: - RAILS_ENV=test rake db:create - cp contrib/auto_wizard_example.json auto_wizard.json - script/bootstrap.sh - - rake assets:precompile - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT - ruby -I test/ test/integration/auto_wizard_test.rb || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT -job_integration_zendesk_chrome: +test:browser:integration:zendesk_chrome: stage: browser + dependencies: + - browser:build tags: - browser-chrome script: - export BROWSER_URL=http://$IP:$BROWSER_PORT - RAILS_ENV=test rake db:create - script/bootstrap.sh - - rake assets:precompile - script/build/test_startup.sh $RAILS_ENV $BROWSER_PORT $WS_PORT - ruby -I test/ test/integration/zendesk_import_browser_test.rb || script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT 1 - script/build/test_shutdown.sh $RAILS_ENV $BROWSER_PORT $WS_PORT