diff options
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 107 |
1 files changed, 74 insertions, 33 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1c4d98ea3f6..498c7447ede 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: "ruby:2.2" +image: "ruby:2.1" services: - mysql:latest @@ -6,7 +6,7 @@ services: - redis:latest cache: - key: "ruby22" + key: "ruby21" paths: - vendor @@ -24,7 +24,12 @@ before_script: - bundle install --without postgres production --jobs $(nproc) "${FLAGS[@]}" - RAILS_ENV=test bundle exec rake db:drop db:create db:schema:load db:migrate +stages: +- test +- notifications + spec:feature: + stage: test script: - RAILS_ENV=test bundle exec rake assets:precompile 2>/dev/null - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:feature @@ -33,6 +38,7 @@ spec:feature: - mysql spec:api: + stage: test script: - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:api tags: @@ -40,6 +46,7 @@ spec:api: - mysql spec:models: + stage: test script: - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:models tags: @@ -47,6 +54,7 @@ spec:models: - mysql spec:lib: + stage: test script: - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:lib tags: @@ -54,6 +62,7 @@ spec:lib: - mysql spec:services: + stage: test script: - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:services tags: @@ -61,6 +70,7 @@ spec:services: - mysql spec:benchmark: + stage: test script: - RAILS_ENV=test bundle exec rake spec:benchmark tags: @@ -69,6 +79,7 @@ spec:benchmark: allow_failure: true spec:other: + stage: test script: - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:other tags: @@ -76,6 +87,7 @@ spec:other: - mysql spinach:project:half: + stage: test script: - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:half tags: @@ -83,6 +95,7 @@ spinach:project:half: - mysql spinach:project:rest: + stage: test script: - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:rest tags: @@ -90,6 +103,7 @@ spinach:project:rest: - mysql spinach:other: + stage: test script: - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:other tags: @@ -97,6 +111,7 @@ spinach:other: - mysql teaspoon: + stage: test script: - RAILS_ENV=test bundle exec teaspoon tags: @@ -104,6 +119,7 @@ teaspoon: - mysql rubocop: + stage: test script: - bundle exec rubocop tags: @@ -111,6 +127,7 @@ rubocop: - mysql brakeman: + stage: test script: - bundle exec rake brakeman tags: @@ -118,6 +135,7 @@ brakeman: - mysql flog: + stage: test script: - bundle exec rake flog tags: @@ -125,6 +143,7 @@ flog: - mysql flay: + stage: test script: - bundle exec rake flay tags: @@ -132,6 +151,7 @@ flay: - mysql bundler:audit: + stage: test script: - "bundle exec bundle-audit update" - "bundle exec bundle-audit check" @@ -140,87 +160,93 @@ bundler:audit: - mysql allow_failure: true -# Ruby 2.1 jobs +# Ruby 2.2 jobs -spec:feature:ruby21: - image: ruby:2.1 +spec:feature:ruby22: + stage: test + image: ruby:2.2 only: - master script: - RAILS_ENV=test bundle exec rake assets:precompile 2>/dev/null - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:feature cache: - key: "ruby21" + key: "ruby22" paths: - vendor tags: - ruby - mysql -spec:api:ruby21: - image: ruby:2.1 +spec:api:ruby22: + stage: test + image: ruby:2.2 only: - master script: - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:api cache: - key: "ruby21" + key: "ruby22" paths: - vendor tags: - ruby - mysql -spec:models:ruby21: - image: ruby:2.1 +spec:models:ruby22: + stage: test + image: ruby:2.2 only: - master script: - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:models cache: - key: "ruby21" + key: "ruby22" paths: - vendor tags: - ruby - mysql -spec:lib:ruby21: - image: ruby:2.1 +spec:lib:ruby22: + stage: test + image: ruby:2.2 only: - master script: - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:lib cache: - key: "ruby21" + key: "ruby22" paths: - vendor tags: - ruby - mysql -spec:services:ruby21: - image: ruby:2.1 +spec:services:ruby22: + stage: test + image: ruby:2.2 only: - master script: - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:services cache: - key: "ruby21" + key: "ruby22" paths: - vendor tags: - ruby - mysql -spec:benchmark:ruby21: - image: ruby:2.1 +spec:benchmark:ruby22: + stage: test + image: ruby:2.2 only: - master script: - RAILS_ENV=test bundle exec rake spec:benchmark cache: - key: "ruby21" + key: "ruby22" paths: - vendor tags: @@ -228,59 +254,74 @@ spec:benchmark:ruby21: - mysql allow_failure: true -spec:other:ruby21: - image: ruby:2.1 +spec:other:ruby22: + stage: test + image: ruby:2.2 only: - master script: - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:other cache: - key: "ruby21" + key: "ruby22" paths: - vendor tags: - ruby - mysql -spinach:project:half:ruby21: - image: ruby:2.1 +spinach:project:half:ruby22: + stage: test + image: ruby:2.2 only: - master script: - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:half cache: - key: "ruby21" + key: "ruby22" paths: - vendor tags: - ruby - mysql -spinach:project:rest:ruby21: - image: ruby:2.1 +spinach:project:rest:ruby22: + stage: test + image: ruby:2.2 only: - master script: - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:rest cache: - key: "ruby21" + key: "ruby22" paths: - vendor tags: - ruby - mysql -spinach:other:ruby21: - image: ruby:2.1 +spinach:other:ruby22: + stage: test + image: ruby:2.2 only: - master script: - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:other cache: - key: "ruby21" + key: "ruby22" paths: - vendor tags: - ruby - mysql + +notify:slack: + stage: notifications + script: + - ./scripts/notify_slack.sh "#builds" "Build failed for master/tags!" + when: on_failure + only: + - master@gitlab-org/gitlab-ce + - tags@gitlab-org/gitlab-ce + - master@gitlab-org/gitlab-ee + - tags@gitlab-org/gitlab-ee
\ No newline at end of file |