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

53 lines
1.4 KiB
YAML
Raw Normal View History

2016-09-30 11:45:03 +00:00
image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.3-git-2.7-phantomjs-2.1"
2016-01-22 13:45:34 +00:00
2016-02-07 00:57:04 +00:00
cache:
2016-08-12 12:41:27 +00:00
key: "ruby-231"
2016-02-07 00:57:04 +00:00
paths:
- vendor/ruby
2016-02-07 00:57:04 +00:00
2016-01-22 13:45:34 +00:00
variables:
MYSQL_ALLOW_EMPTY_PASSWORD: "1"
2015-11-12 09:52:20 +00:00
# retry tests only in CI environment
RSPEC_RETRY_RETRY_COUNT: "3"
2016-05-22 01:41:17 +00:00
RAILS_ENV: "test"
SIMPLECOV: "true"
SETUP_DB: "true"
2016-06-03 21:03:58 +00:00
USE_BUNDLE_INSTALL: "true"
2016-06-17 08:59:48 +00:00
GIT_DEPTH: "20"
2016-08-09 18:25:11 +00:00
PHANTOMJS_VERSION: "2.1.1"
2016-01-22 13:45:34 +00:00
before_script:
- source ./scripts/prepare_build.sh
2015-06-03 20:05:33 +00:00
- cp config/gitlab.yml.example config/gitlab.yml
2016-05-22 05:31:38 +00:00
- bundle --version
2016-06-03 20:54:25 +00:00
- '[ "$USE_BUNDLE_INSTALL" != "true" ] || retry bundle install --without postgres production --jobs $(nproc) "${FLAGS[@]}"'
2016-06-07 08:45:02 +00:00
- retry gem install knapsack
2016-10-05 23:05:16 +00:00
- '[ "$SETUP_DB" != "true" ] || bundle exec rake db:drop db:create db:schema:load db:migrate add_limits_mysql'
2016-05-22 01:17:15 +00:00
stages:
2016-06-03 15:15:00 +00:00
- prepare
2016-05-22 01:17:15 +00:00
- test
- post-test
2016-06-30 17:04:00 +00:00
- pages
.use-db: &use-db
services:
- mysql:latest
- redis:alpine
migration paths:
stage: test
<<: *use-db
variables:
SETUP_DB: "false"
script:
2016-11-21 21:57:06 +00:00
- git fetch origin v8.5.9
- git checkout -f FETCH_HEAD
- cp config/resque.yml.example config/resque.yml
- sed -i 's/localhost/redis/g' config/resque.yml
2016-11-21 21:51:38 +00:00
- bundle install --without postgres production --jobs $(nproc) ${FLAGS[@]} --retry=3
- rake db:drop db:create db:schema:load db:seed_fu
- git checkout $CI_BUILD_REF
- source scripts/prepare_build.sh
- rake db:migrate