Commit 7977b99f authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'build-with-gitlab-ce-ee-runners' into 'master'

Run builds with runners with tags gitlab-org and 2gb

## What does this MR do?

Added `gitlab-org` and `2gb` tags for jobs in `.gitlab-ci.yml`. So builds will be picked up by `gitlab-shared-runners-manager-X.gitlab.com runners`

## Are there points in the code the reviewer needs to double check?

Only `.gitlab-ci.yml`

## Why was this MR needed?

https://gitlab.com/gitlab-com/infrastructure/issues/714

## Screenshots (if relevant)


## Does this MR meet the acceptance criteria?

- [ ] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

https://gitlab.com/gitlab-com/infrastructure/issues/714

See merge request !7757
parents bdeafd14 9d85320c
......@@ -30,7 +30,12 @@ stages:
- post-test
- pages
# Prepare and merge knapsack tests
# Predefined scopes
.dedicated-runner: &dedicated-runner
tags:
- gitlab-org
- 2gb
.knapsack-state: &knapsack-state
services: []
variables:
......@@ -45,47 +50,14 @@ stages:
paths:
- 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
services:
- mysql:latest
- 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
stage: test
<<: *dedicated-runner
<<: *use-db
script:
- JOB_NAME=( $CI_BUILD_NAME )
......@@ -103,6 +75,7 @@ setup-test-env:
.spinach-knapsack: &spinach-knapsack
stage: test
<<: *dedicated-runner
<<: *use-db
script:
- JOB_NAME=( $CI_BUILD_NAME )
......@@ -118,6 +91,44 @@ setup-test-env:
- knapsack/
- 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 1 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
<<: *dedicated-runner
<<: *ruby-21
.spinach-knapsack-ruby21: &spinach-knapsack-ruby21
<<: *spinach-knapsack
<<: *dedicated-runner
<<: *ruby-21
rspec 0 20 ruby21: *rspec-knapsack-ruby21
......@@ -214,6 +227,7 @@ spinach 9 10 ruby21: *spinach-knapsack-ruby21
.exec: &exec
<<: *ruby-static-analysis
<<: *dedicated-runner
stage: test
script:
- bundle exec $CI_BUILD_NAME
......@@ -249,12 +263,14 @@ rake ee_compat_check:
rake db:migrate:reset:
stage: test
<<: *use-db
<<: *dedicated-runner
script:
- rake db:migrate:reset
rake db:seed_fu:
stage: test
<<: *use-db
<<: *dedicated-runner
variables:
SIZE: "1"
SETUP_DB: "false"
......@@ -276,6 +292,7 @@ teaspoon:
- node_modules/
stage: test
<<: *use-db
<<: *dedicated-runner
script:
- npm install
- npm link istanbul
......@@ -288,6 +305,7 @@ teaspoon:
lint-doc:
stage: test
<<: *dedicated-runner
image: "phusion/baseimage:latest"
before_script: []
script:
......@@ -295,6 +313,7 @@ lint-doc:
bundler:check:
stage: test
<<: *dedicated-runner
<<: *ruby-static-analysis
script:
- bundle check
......@@ -302,6 +321,7 @@ bundler:check:
bundler:audit:
stage: test
<<: *ruby-static-analysis
<<: *dedicated-runner
only:
- master@gitlab-org/gitlab-ce
- master@gitlab-org/gitlab-ee
......@@ -313,6 +333,7 @@ bundler:audit:
migration paths:
stage: test
<<: *use-db
<<: *dedicated-runner
variables:
SETUP_DB: "false"
only:
......@@ -334,6 +355,7 @@ migration paths:
coverage:
stage: post-test
services: []
<<: *dedicated-runner
variables:
SETUP_DB: "false"
USE_BUNDLE_INSTALL: "true"
......@@ -347,6 +369,7 @@ coverage:
- coverage/assets/
lint:javascript:
<<: *dedicated-runner
cache:
paths:
- node_modules/
......@@ -358,6 +381,7 @@ lint:javascript:
- npm --silent run eslint
lint:javascript:report:
<<: *dedicated-runner
cache:
paths:
- node_modules/
......@@ -379,6 +403,7 @@ lint:javascript:report:
trigger_docs:
stage: post-test
image: "alpine"
<<: *dedicated-runner
before_script:
- apk update && apk add curl
variables:
......@@ -394,6 +419,7 @@ trigger_docs:
notify:slack:
stage: post-test
<<: *dedicated-runner
variables:
SETUP_DB: "false"
USE_BUNDLE_INSTALL: "false"
......@@ -409,6 +435,7 @@ notify:slack:
pages:
before_script: []
stage: pages
<<: *dedicated-runner
dependencies:
- coverage
- teaspoon
......@@ -423,11 +450,12 @@ pages:
paths:
- public
only:
- master
- master@gitlab-org/gitlab-ce
# Insurance in case a gem needed by one of our releases gets yanked from
# rubygems.org in the future.
cache gems:
<<: *dedicated-runner
only:
- tags
variables:
......@@ -437,3 +465,5 @@ cache gems:
artifacts:
paths:
- vendor/cache
only:
- master@gitlab-org/gitlab-ce
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment