summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorZ.J. van de Weg <zegerjan@gitlab.com>2016-06-29 16:08:20 +0200
committerZ.J. van de Weg <zegerjan@gitlab.com>2016-06-29 16:56:16 +0200
commita697b3c5c4674ae1de2e4836eda771ab2baa2ddc (patch)
tree97d9a667cfbf1da5533cae27bdb5963005413fa2 /.gitlab-ci.yml
parentbef4294c58e0bbadc01f633fc8bea514801de7ae (diff)
downloadgitlab-ce-a697b3c5c4674ae1de2e4836eda771ab2baa2ddc.tar.gz
Speed improvement for builds without DB
Now the builds which do not use the DB or Redis won't pull the images from docker, and won't migrate the DB. This _should_ improve the build times slightly but also create a cleaner trace.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml42
1 files changed, 34 insertions, 8 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ff8aa351226..0bd3df4c9e8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,9 +1,5 @@
image: "ruby:2.1"
-services:
- - mysql:latest
- - redis:alpine
-
cache:
key: "ruby21"
paths:
@@ -34,7 +30,6 @@ stages:
- post-test
# Prepare and merge knapsack tests
-
.knapsack-state: &knapsack-state
services: []
variables:
@@ -70,6 +65,9 @@ update-knapsack:
.rspec-knapsack: &rspec-knapsack
stage: test
+ services:
+ - mysql:latest
+ - redis:alpine
script:
- bundle exec rake assets:precompile 2>/dev/null
- JOB_NAME=( $CI_BUILD_NAME )
@@ -85,6 +83,9 @@ update-knapsack:
.spinach-knapsack: &spinach-knapsack
stage: test
+ services:
+ - mysql:latest
+ - redis:alpine
script:
- bundle exec rake assets:precompile 2>/dev/null
- JOB_NAME=( $CI_BUILD_NAME )
@@ -133,6 +134,9 @@ spinach 9 10: *spinach-knapsack
# Execute all testing suites against Ruby 2.3
.ruby-23: &ruby-23
image: "ruby:2.3"
+ services:
+ - mysql:latest
+ - redis:alpine
only:
- master
cache:
@@ -148,7 +152,7 @@ spinach 9 10: *spinach-knapsack
.spinach-knapsack-ruby23: &spinach-knapsack-ruby23
<<: *spinach-knapsack
<<: *ruby-23
-
+
rspec 0 20 ruby23: *rspec-knapsack-ruby23
rspec 1 20 ruby23: *rspec-knapsack-ruby23
rspec 2 20 ruby23: *rspec-knapsack-ruby23
@@ -184,21 +188,43 @@ spinach 9 10 ruby23: *spinach-knapsack-ruby23
# Other generic tests
.exec: &exec
+ variables:
+ SIMPLECOV: "false"
+ USE_DB: "false"
+ USE_BUNDLE_INSTALL: "true"
stage: test
script:
- bundle exec $CI_BUILD_NAME
-teaspoon: *exec
rubocop: *exec
rake scss_lint: *exec
rake brakeman: *exec
rake flog: *exec
rake flay: *exec
-rake db:migrate:reset: *exec
license_finder: *exec
+rake db:migrate:reset:
+ stage: test
+ services:
+ - mysql:latest
+ - redis:alpine
+ script:
+ - rake db:migrate:reset
+
+teaspoon:
+ stage: test
+ services:
+ - mysql:latest
+ - redis:alpine
+ script:
+ - teaspoon
+
bundler:audit:
stage: test
+ variables:
+ SIMPLECOV: "false"
+ USE_DB: "false"
+ USE_BUNDLE_INSTALL: "true"
only:
- master
script: