blob: 03568db208937a4bebe8b37b483f0e20914398c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
image: "ruby:2.1"
services:
- mysql:latest
- postgres:latest
- redis:latest
cache:
key: "ruby21"
paths:
- vendor
variables:
MYSQL_ALLOW_EMPTY_PASSWORD: "1"
before_script:
- source ./scripts/prepare_build.sh
- ruby -v
- which ruby
- gem install bundler --no-ri --no-rdoc
- cp config/gitlab.yml.example config/gitlab.yml
- touch log/application.log
- touch log/test.log
- 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
rubocop:
stage: test
script:
- bundle exec rubocop
tags:
- ruby
- mysql
notify:slack:
stage: notifications
script:
- 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
|