-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
129 lines (112 loc) · 2.74 KB
/
.gitlab-ci.yml
File metadata and controls
129 lines (112 loc) · 2.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
.specs: &specs
cache:
key: "$CI_JOB_NAME"
paths:
- vendor/ruby
before_script:
- ruby -v # Print out ruby version for debugging
- bundle install -j $(nproc) --path vendor # Install dependencies into ./vendor/ruby
script:
- bundle exec rake
artifacts:
reports:
junit: rspec.xml
.rubocop: &rubocop
cache:
key: "$CI_JOB_NAME"
paths:
- vendor/ruby
before_script:
- ruby -v # Print out ruby version for debugging
- bundle install -j $(nproc) --path vendor # Install dependencies into ./vendor/ruby
script:
- bundle exec rubocop
rubocop ruby2.6:
image: "ruby:2.6"
<<: *rubocop
rubocop ruby2.5:
image: "ruby:2.5"
<<: *rubocop
rubocop ruby2.4:
image: "ruby:2.4"
<<: *rubocop
ruby-2.6 rails-master:
image: "ruby:2.6"
variables:
GEMFILE: gemfiles/rails-master.gemfile
allow_failure: true
<<: *specs
ruby-2.6 rails5.2:
image: "ruby:2.6"
variables:
GEMFILE: gemfiles/rails-5-2-stable.gemfile
<<: *specs
ruby-2.6 rails5.1:
image: "ruby:2.6"
variables:
GEMFILE: gemfiles/rails-5-1-stable.gemfile
<<: *specs
ruby-2.6 rails5.0:
image: "ruby:2.6"
variables:
GEMFILE: gemfiles/rails-5-0-stable.gemfile
<<: *specs
ruby-2.5 rails-master:
image: "ruby:2.5"
variables:
GEMFILE: gemfiles/rails-master.gemfile
allow_failure: true
<<: *specs
ruby-2.5 rails5.2:
image: "ruby:2.5"
variables:
GEMFILE: gemfiles/rails-5-2-stable.gemfile
<<: *specs
ruby-2.5 rails5.1:
image: "ruby:2.5"
variables:
GEMFILE: gemfiles/rails-5-1-stable.gemfile
<<: *specs
ruby-2.5 rails5.0:
image: "ruby:2.5"
variables:
GEMFILE: gemfiles/rails-5-0-stable.gemfile
<<: *specs
ruby-2.4 rails-master:
image: "ruby:2.4"
variables:
GEMFILE: gemfiles/rails-master.gemfile
allow_failure: true
<<: *specs
ruby-2.4 rails5.2:
image: "ruby:2.4"
variables:
GEMFILE: gemfiles/rails-5-2-stable.gemfile
<<: *specs
ruby-2.4 rails5.1:
image: "ruby:2.4"
variables:
GEMFILE: gemfiles/rails-5-1-stable.gemfile
<<: *specs
ruby-2.4 rails5.0:
image: "ruby:2.4"
variables:
GEMFILE: gemfiles/rails-5-0-stable.gemfile
<<: *specs
code_quality:
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- docker:stable-dind
script:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
- docker run
--env SOURCE_CODE="$PWD"
--volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
artifacts:
reports:
codequality: gl-code-quality-report.json