summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-07-20 19:21:07 +0000
committerDouwe Maan <douwe@gitlab.com>2016-07-20 19:21:07 +0000
commit5a77eb153669bfbac4ab1f05615d11965beb826d (patch)
tree2dd91d6dc44124b6a28c904a6d0e3e986c530b4b /.gitlab-ci.yml
parent5eb307a1e087e9b11cbe637f28f27b3d84923c48 (diff)
parentcf4c9b494e915fa0530edb67c624192617e9d473 (diff)
downloadgitlab-ce-5a77eb153669bfbac4ab1f05615d11965beb826d.tar.gz
Merge branch 'faster-builds-ci' into 'master'
Speed improvement for builds without DB Only fetch the images which we are going to use. Speeds up the builds by about 30-45 seconds. /cc @ayufan See merge request !4994
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml35
1 files changed, 28 insertions, 7 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f566dfd76e9..2d33bad5886 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:
@@ -68,8 +63,14 @@ update-knapsack:
# Execute all testing suites
+.use-db: &use-db
+ services:
+ - mysql:latest
+ - redis:alpine
+
.rspec-knapsack: &rspec-knapsack
stage: test
+ <<: *use-db
script:
- bundle exec rake assets:precompile 2>/dev/null
- JOB_NAME=( $CI_BUILD_NAME )
@@ -85,6 +86,7 @@ update-knapsack:
.spinach-knapsack: &spinach-knapsack
stage: test
+ <<: *use-db
script:
- bundle exec rake assets:precompile 2>/dev/null
- JOB_NAME=( $CI_BUILD_NAME )
@@ -133,6 +135,7 @@ spinach 9 10: *spinach-knapsack
# Execute all testing suites against Ruby 2.3
.ruby-23: &ruby-23
image: "ruby:2.3"
+ <<: *use-db
only:
- master
cache:
@@ -183,23 +186,41 @@ spinach 9 10 ruby23: *spinach-knapsack-ruby23
# Other generic tests
+.static-analyses-variables: &static-analyses-variables
+ variables:
+ SIMPLECOV: "false"
+ USE_DB: "false"
+ USE_BUNDLE_INSTALL: "true"
+
.exec: &exec
+ <<: *static-analyses-variables
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 downtime_check: *exec
+rake db:migrate:reset:
+ stage: test
+ <<: *use-db
+ script:
+ - rake db:migrate:reset
+
+teaspoon:
+ stage: test
+ <<: *use-db
+ script:
+ - teaspoon
+
bundler:audit:
stage: test
+ <<: *static-analyses-variables
only:
- master
script: