gitlab-org--gitlab-foss/.gitlab-ci.yml

48 lines
1.1 KiB
YAML

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