Run builds with runners with tags gitlab-org and 2gb
This commit is contained in:
parent
532c031915
commit
9d85320c67
1 changed files with 69 additions and 39 deletions
108
.gitlab-ci.yml
108
.gitlab-ci.yml
|
@ -30,7 +30,12 @@ stages:
|
||||||
- post-test
|
- post-test
|
||||||
- pages
|
- pages
|
||||||
|
|
||||||
# Prepare and merge knapsack tests
|
# Predefined scopes
|
||||||
|
.dedicated-runner: &dedicated-runner
|
||||||
|
tags:
|
||||||
|
- gitlab-org
|
||||||
|
- 2gb
|
||||||
|
|
||||||
.knapsack-state: &knapsack-state
|
.knapsack-state: &knapsack-state
|
||||||
services: []
|
services: []
|
||||||
variables:
|
variables:
|
||||||
|
@ -45,47 +50,14 @@ stages:
|
||||||
paths:
|
paths:
|
||||||
- knapsack/
|
- knapsack/
|
||||||
|
|
||||||
knapsack:
|
|
||||||
<<: *knapsack-state
|
|
||||||
stage: prepare
|
|
||||||
script:
|
|
||||||
- mkdir -p knapsack/
|
|
||||||
- '[[ -f knapsack/rspec_report.json ]] || echo "{}" > knapsack/rspec_report.json'
|
|
||||||
- '[[ -f knapsack/spinach_report.json ]] || echo "{}" > knapsack/spinach_report.json'
|
|
||||||
|
|
||||||
update-knapsack:
|
|
||||||
<<: *knapsack-state
|
|
||||||
stage: post-test
|
|
||||||
script:
|
|
||||||
- scripts/merge-reports knapsack/rspec_report.json knapsack/rspec_node_*.json
|
|
||||||
- scripts/merge-reports knapsack/spinach_report.json knapsack/spinach_node_*.json
|
|
||||||
- rm -f knapsack/*_node_*.json
|
|
||||||
only:
|
|
||||||
- master@gitlab-org/gitlab-ce
|
|
||||||
- master@gitlab-org/gitlab-ee
|
|
||||||
- master@gitlab/gitlabhq
|
|
||||||
- master@gitlab/gitlab-ee
|
|
||||||
|
|
||||||
.use-db: &use-db
|
.use-db: &use-db
|
||||||
services:
|
services:
|
||||||
- mysql:latest
|
- mysql:latest
|
||||||
- redis:alpine
|
- redis:alpine
|
||||||
|
|
||||||
setup-test-env:
|
|
||||||
<<: *use-db
|
|
||||||
stage: prepare
|
|
||||||
script:
|
|
||||||
- bundle exec rake assets:precompile 2>/dev/null
|
|
||||||
- bundle exec ruby -Ispec -e 'require "spec_helper" ; TestEnv.init'
|
|
||||||
artifacts:
|
|
||||||
expire_in: 7d
|
|
||||||
paths:
|
|
||||||
- public/assets
|
|
||||||
- tmp/tests
|
|
||||||
|
|
||||||
|
|
||||||
.rspec-knapsack: &rspec-knapsack
|
.rspec-knapsack: &rspec-knapsack
|
||||||
stage: test
|
stage: test
|
||||||
|
<<: *dedicated-runner
|
||||||
<<: *use-db
|
<<: *use-db
|
||||||
script:
|
script:
|
||||||
- JOB_NAME=( $CI_BUILD_NAME )
|
- JOB_NAME=( $CI_BUILD_NAME )
|
||||||
|
@ -103,6 +75,7 @@ setup-test-env:
|
||||||
|
|
||||||
.spinach-knapsack: &spinach-knapsack
|
.spinach-knapsack: &spinach-knapsack
|
||||||
stage: test
|
stage: test
|
||||||
|
<<: *dedicated-runner
|
||||||
<<: *use-db
|
<<: *use-db
|
||||||
script:
|
script:
|
||||||
- JOB_NAME=( $CI_BUILD_NAME )
|
- JOB_NAME=( $CI_BUILD_NAME )
|
||||||
|
@ -118,6 +91,44 @@ setup-test-env:
|
||||||
- knapsack/
|
- knapsack/
|
||||||
- coverage/
|
- coverage/
|
||||||
|
|
||||||
|
# Prepare and merge knapsack tests
|
||||||
|
|
||||||
|
knapsack:
|
||||||
|
<<: *knapsack-state
|
||||||
|
<<: *dedicated-runner
|
||||||
|
stage: prepare
|
||||||
|
script:
|
||||||
|
- mkdir -p knapsack/
|
||||||
|
- '[[ -f knapsack/rspec_report.json ]] || echo "{}" > knapsack/rspec_report.json'
|
||||||
|
- '[[ -f knapsack/spinach_report.json ]] || echo "{}" > knapsack/spinach_report.json'
|
||||||
|
|
||||||
|
setup-test-env:
|
||||||
|
<<: *use-db
|
||||||
|
<<: *dedicated-runner
|
||||||
|
stage: prepare
|
||||||
|
script:
|
||||||
|
- bundle exec rake assets:precompile 2>/dev/null
|
||||||
|
- bundle exec ruby -Ispec -e 'require "spec_helper" ; TestEnv.init'
|
||||||
|
artifacts:
|
||||||
|
expire_in: 7d
|
||||||
|
paths:
|
||||||
|
- public/assets
|
||||||
|
- tmp/tests
|
||||||
|
|
||||||
|
update-knapsack:
|
||||||
|
<<: *knapsack-state
|
||||||
|
<<: *dedicated-runner
|
||||||
|
stage: post-test
|
||||||
|
script:
|
||||||
|
- scripts/merge-reports knapsack/rspec_report.json knapsack/rspec_node_*.json
|
||||||
|
- scripts/merge-reports knapsack/spinach_report.json knapsack/spinach_node_*.json
|
||||||
|
- rm -f knapsack/*_node_*.json
|
||||||
|
only:
|
||||||
|
- master@gitlab-org/gitlab-ce
|
||||||
|
- master@gitlab-org/gitlab-ee
|
||||||
|
- master@gitlab/gitlabhq
|
||||||
|
- master@gitlab/gitlab-ee
|
||||||
|
|
||||||
rspec 0 20: *rspec-knapsack
|
rspec 0 20: *rspec-knapsack
|
||||||
rspec 1 20: *rspec-knapsack
|
rspec 1 20: *rspec-knapsack
|
||||||
rspec 2 20: *rspec-knapsack
|
rspec 2 20: *rspec-knapsack
|
||||||
|
@ -166,10 +177,12 @@ spinach 9 10: *spinach-knapsack
|
||||||
|
|
||||||
.rspec-knapsack-ruby21: &rspec-knapsack-ruby21
|
.rspec-knapsack-ruby21: &rspec-knapsack-ruby21
|
||||||
<<: *rspec-knapsack
|
<<: *rspec-knapsack
|
||||||
|
<<: *dedicated-runner
|
||||||
<<: *ruby-21
|
<<: *ruby-21
|
||||||
|
|
||||||
.spinach-knapsack-ruby21: &spinach-knapsack-ruby21
|
.spinach-knapsack-ruby21: &spinach-knapsack-ruby21
|
||||||
<<: *spinach-knapsack
|
<<: *spinach-knapsack
|
||||||
|
<<: *dedicated-runner
|
||||||
<<: *ruby-21
|
<<: *ruby-21
|
||||||
|
|
||||||
rspec 0 20 ruby21: *rspec-knapsack-ruby21
|
rspec 0 20 ruby21: *rspec-knapsack-ruby21
|
||||||
|
@ -214,6 +227,7 @@ spinach 9 10 ruby21: *spinach-knapsack-ruby21
|
||||||
|
|
||||||
.exec: &exec
|
.exec: &exec
|
||||||
<<: *ruby-static-analysis
|
<<: *ruby-static-analysis
|
||||||
|
<<: *dedicated-runner
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- bundle exec $CI_BUILD_NAME
|
- bundle exec $CI_BUILD_NAME
|
||||||
|
@ -249,12 +263,14 @@ rake ee_compat_check:
|
||||||
rake db:migrate:reset:
|
rake db:migrate:reset:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *use-db
|
<<: *use-db
|
||||||
|
<<: *dedicated-runner
|
||||||
script:
|
script:
|
||||||
- rake db:migrate:reset
|
- rake db:migrate:reset
|
||||||
|
|
||||||
rake db:seed_fu:
|
rake db:seed_fu:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *use-db
|
<<: *use-db
|
||||||
|
<<: *dedicated-runner
|
||||||
variables:
|
variables:
|
||||||
SIZE: "1"
|
SIZE: "1"
|
||||||
SETUP_DB: "false"
|
SETUP_DB: "false"
|
||||||
|
@ -276,6 +292,7 @@ teaspoon:
|
||||||
- node_modules/
|
- node_modules/
|
||||||
stage: test
|
stage: test
|
||||||
<<: *use-db
|
<<: *use-db
|
||||||
|
<<: *dedicated-runner
|
||||||
script:
|
script:
|
||||||
- npm install
|
- npm install
|
||||||
- npm link istanbul
|
- npm link istanbul
|
||||||
|
@ -288,20 +305,23 @@ teaspoon:
|
||||||
|
|
||||||
lint-doc:
|
lint-doc:
|
||||||
stage: test
|
stage: test
|
||||||
|
<<: *dedicated-runner
|
||||||
image: "phusion/baseimage:latest"
|
image: "phusion/baseimage:latest"
|
||||||
before_script: []
|
before_script: []
|
||||||
script:
|
script:
|
||||||
- scripts/lint-doc.sh
|
- scripts/lint-doc.sh
|
||||||
|
|
||||||
bundler:check:
|
bundler:check:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *ruby-static-analysis
|
<<: *dedicated-runner
|
||||||
script:
|
<<: *ruby-static-analysis
|
||||||
|
script:
|
||||||
- bundle check
|
- bundle check
|
||||||
|
|
||||||
bundler:audit:
|
bundler:audit:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *ruby-static-analysis
|
<<: *ruby-static-analysis
|
||||||
|
<<: *dedicated-runner
|
||||||
only:
|
only:
|
||||||
- master@gitlab-org/gitlab-ce
|
- master@gitlab-org/gitlab-ce
|
||||||
- master@gitlab-org/gitlab-ee
|
- master@gitlab-org/gitlab-ee
|
||||||
|
@ -313,6 +333,7 @@ bundler:audit:
|
||||||
migration paths:
|
migration paths:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *use-db
|
<<: *use-db
|
||||||
|
<<: *dedicated-runner
|
||||||
variables:
|
variables:
|
||||||
SETUP_DB: "false"
|
SETUP_DB: "false"
|
||||||
only:
|
only:
|
||||||
|
@ -334,6 +355,7 @@ migration paths:
|
||||||
coverage:
|
coverage:
|
||||||
stage: post-test
|
stage: post-test
|
||||||
services: []
|
services: []
|
||||||
|
<<: *dedicated-runner
|
||||||
variables:
|
variables:
|
||||||
SETUP_DB: "false"
|
SETUP_DB: "false"
|
||||||
USE_BUNDLE_INSTALL: "true"
|
USE_BUNDLE_INSTALL: "true"
|
||||||
|
@ -347,6 +369,7 @@ coverage:
|
||||||
- coverage/assets/
|
- coverage/assets/
|
||||||
|
|
||||||
lint:javascript:
|
lint:javascript:
|
||||||
|
<<: *dedicated-runner
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- node_modules/
|
- node_modules/
|
||||||
|
@ -358,6 +381,7 @@ lint:javascript:
|
||||||
- npm --silent run eslint
|
- npm --silent run eslint
|
||||||
|
|
||||||
lint:javascript:report:
|
lint:javascript:report:
|
||||||
|
<<: *dedicated-runner
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- node_modules/
|
- node_modules/
|
||||||
|
@ -379,6 +403,7 @@ lint:javascript:report:
|
||||||
trigger_docs:
|
trigger_docs:
|
||||||
stage: post-test
|
stage: post-test
|
||||||
image: "alpine"
|
image: "alpine"
|
||||||
|
<<: *dedicated-runner
|
||||||
before_script:
|
before_script:
|
||||||
- apk update && apk add curl
|
- apk update && apk add curl
|
||||||
variables:
|
variables:
|
||||||
|
@ -394,6 +419,7 @@ trigger_docs:
|
||||||
|
|
||||||
notify:slack:
|
notify:slack:
|
||||||
stage: post-test
|
stage: post-test
|
||||||
|
<<: *dedicated-runner
|
||||||
variables:
|
variables:
|
||||||
SETUP_DB: "false"
|
SETUP_DB: "false"
|
||||||
USE_BUNDLE_INSTALL: "false"
|
USE_BUNDLE_INSTALL: "false"
|
||||||
|
@ -409,6 +435,7 @@ notify:slack:
|
||||||
pages:
|
pages:
|
||||||
before_script: []
|
before_script: []
|
||||||
stage: pages
|
stage: pages
|
||||||
|
<<: *dedicated-runner
|
||||||
dependencies:
|
dependencies:
|
||||||
- coverage
|
- coverage
|
||||||
- teaspoon
|
- teaspoon
|
||||||
|
@ -423,11 +450,12 @@ pages:
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
only:
|
only:
|
||||||
- master
|
- master@gitlab-org/gitlab-ce
|
||||||
|
|
||||||
# Insurance in case a gem needed by one of our releases gets yanked from
|
# Insurance in case a gem needed by one of our releases gets yanked from
|
||||||
# rubygems.org in the future.
|
# rubygems.org in the future.
|
||||||
cache gems:
|
cache gems:
|
||||||
|
<<: *dedicated-runner
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
variables:
|
variables:
|
||||||
|
@ -437,3 +465,5 @@ cache gems:
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- vendor/cache
|
- vendor/cache
|
||||||
|
only:
|
||||||
|
- master@gitlab-org/gitlab-ce
|
||||||
|
|
Loading…
Reference in a new issue