2016-02-19 14:59:46 +00:00
|
|
|
image: "ruby:2.1"
|
2016-01-22 13:45:34 +00:00
|
|
|
|
|
|
|
services:
|
|
|
|
- mysql:latest
|
|
|
|
- postgres:latest
|
|
|
|
- redis:latest
|
|
|
|
|
2016-02-07 00:57:04 +00:00
|
|
|
cache:
|
2016-02-19 16:19:57 +00:00
|
|
|
key: "ruby21"
|
2016-02-07 00:57:04 +00:00
|
|
|
paths:
|
|
|
|
- vendor
|
|
|
|
|
2016-01-22 13:45:34 +00:00
|
|
|
variables:
|
|
|
|
MYSQL_ALLOW_EMPTY_PASSWORD: "1"
|
|
|
|
|
2015-06-04 14:54:32 +00:00
|
|
|
before_script:
|
2016-01-22 17:16:59 +00:00
|
|
|
- source ./scripts/prepare_build.sh
|
2015-06-03 20:05:33 +00:00
|
|
|
- ruby -v
|
|
|
|
- which ruby
|
2015-06-17 10:23:43 +00:00
|
|
|
- gem install bundler --no-ri --no-rdoc
|
2015-06-03 20:05:33 +00:00
|
|
|
- cp config/gitlab.yml.example config/gitlab.yml
|
|
|
|
- touch log/application.log
|
|
|
|
- touch log/test.log
|
2015-06-17 10:23:43 +00:00
|
|
|
- bundle install --without postgres production --jobs $(nproc) "${FLAGS[@]}"
|
2016-01-19 00:43:04 +00:00
|
|
|
- RAILS_ENV=test bundle exec rake db:drop db:create db:schema:load db:migrate
|
2015-06-23 14:43:24 +00:00
|
|
|
|
2016-02-03 13:37:17 +00:00
|
|
|
stages:
|
|
|
|
- test
|
|
|
|
- notifications
|
|
|
|
|
2015-06-23 14:43:24 +00:00
|
|
|
rubocop:
|
2016-02-03 13:37:17 +00:00
|
|
|
stage: test
|
2015-06-15 09:00:13 +00:00
|
|
|
script:
|
|
|
|
- bundle exec rubocop
|
|
|
|
tags:
|
|
|
|
- ruby
|
|
|
|
- mysql
|
|
|
|
|
2016-02-03 13:37:17 +00:00
|
|
|
|
|
|
|
notify:slack:
|
|
|
|
stage: notifications
|
|
|
|
script:
|
2016-02-24 17:49:14 +00:00
|
|
|
- if [[ "$(basename „$PWD")" == "gitlab-ce" ]]; then
|
|
|
|
./scripts/notify_slack.sh "#ci-test" "Build failed! Check https://gitlab.com/gitlab-org/gitlab-ee/commit/$CI_BUILD_REF/builds"
|
|
|
|
else
|
|
|
|
./scripts/notify_slack.sh "#ci-test" "Build failed! Check https://gitlab.com/gitlab-org/gitlab-ee/commit/$CI_BUILD_REF/builds"
|
|
|
|
fi
|
|
|
|
when: on_failure
|