This repository has been archived by the owner on Jul 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
187 lines (179 loc) · 6.03 KB
/
.gitlab-ci.yml
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
stages:
- build
- test
- rubocop
- rspec
- format
- report
- deploy
.base_minimal:
image: alpine:latest
cache: {}
tags:
- anything
.base:
image: ruby:2.5.1
cache:
key: gems_and_packages
paths:
- apt-cache/
- vendor/ruby
- vendor/bundle
variables:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
before_script:
- apt-get update -yqq && DEBIAN_FRONTEND=noninteractive apt-get install -yqq locales
- sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
- dpkg-reconfigure --frontend=noninteractive locales
- update-locale LANG=en_US.UTF-8
- gem install bundler -v $BUNDLER_VERSION
- bundle update --ruby --quiet
- bundle --version && bundle install --jobs $(nproc) "${FLAGS[@]}" --quiet --path=vendor
tags:
- anything
.base26:
image: ruby:2.6
cache:
key: gems_and_packages
paths:
- apt-cache/
- vendor/ruby
- vendor/bundle
variables:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
CUSTOM_RUBY_VERSION: "~> 2.6"
before_script:
- apt-get update -yqq && DEBIAN_FRONTEND=noninteractive apt-get install -yqq locales
- sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
- dpkg-reconfigure --frontend=noninteractive locales
- update-locale LANG=en_US.UTF-8
- gem install bundler -v $BUNDLER_VERSION
- bundle update --ruby --quiet
- bundle --version && bundle install --jobs $(nproc) "${FLAGS[@]}" --quiet --path=vendor
tags:
- anything
.base27:
image: ruby:2.7
cache:
key: gems_and_packages
paths:
- apt-cache/
- vendor/ruby
- vendor/bundle
variables:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
CUSTOM_RUBY_VERSION: "~> 2.7"
before_script:
- apt-get update -yqq && DEBIAN_FRONTEND=noninteractive apt-get install -yqq locales
- sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
- dpkg-reconfigure --frontend=noninteractive locales
- update-locale LANG=en_US.UTF-8
- gem install bundler -v $BUNDLER_VERSION
- bundle update --ruby --quiet
- bundle --version && bundle install --jobs $(nproc) "${FLAGS[@]}" --quiet --path=vendor
tags:
- anything
.base_db:
extends: .base
tags:
- anything
services:
- postgres:latest
variables:
RAILS_ENV: test
FANLINK_PG_USER: $POSTGRES_USER
FANLINK_PG_PASSWORD: $POSTGRES_PASSWORD
FANLINK_PG_HOST: $POSTGRES_HOST
FANLINK_PG_DATABASE: $POSTGRES_DB
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_DB: $POSTGRES_DB
before_script:
- apt-get update -yqq && DEBIAN_FRONTEND=noninteractive apt-get install -yqq locales
- sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
- dpkg-reconfigure --frontend=noninteractive locales
- update-locale LANG=en_US.UTF-8
- gem install bundler -v $BUNDLER_VERSION
- bundle update --ruby
- bundle --version && bundle install --jobs $(nproc) "${FLAGS[@]}" --quiet --path=vendor
- export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
- apt-get update -qq && apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -yqq nodejs
- bundle exec rake db:reset
- bundle exec rake db:setup
- bundle exec rake db:test:prepare
.base26_db:
extends: .base26
tags:
- anything
services:
- postgres:latest
variables:
RAILS_ENV: test
FANLINK_PG_USER: $POSTGRES_USER
FANLINK_PG_PASSWORD: $POSTGRES_PASSWORD
FANLINK_PG_HOST: $POSTGRES_HOST
FANLINK_PG_DATABASE: $POSTGRES_DB
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_DB: $POSTGRES_DB
before_script:
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yqq locales
- sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
- dpkg-reconfigure --frontend=noninteractive locales
- update-locale LANG=en_US.UTF-8
- gem install bundler -v $BUNDLER_VERSION
- bundle --version && bundle install --jobs $(nproc) "${FLAGS[@]}" --quiet --path=vendor
- export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
- apt-get update -qq && apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -yqq nodejs
- bundle exec rake db:reset
- bundle exec rake db:setup
- bundle exec rake db:test:prepare
.base27_db:
extends: .base27
tags:
- anything
services:
- postgres:latest
variables:
RAILS_ENV: test
FANLINK_PG_USER: $POSTGRES_USER
FANLINK_PG_PASSWORD: $POSTGRES_PASSWORD
FANLINK_PG_HOST: $POSTGRES_HOST
FANLINK_PG_DATABASE: $POSTGRES_DB
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_DB: $POSTGRES_DB
before_script:
- apt-get update -yqq && DEBIAN_FRONTEND=noninteractive apt-get install -yqq locales
- sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
- dpkg-reconfigure --frontend=noninteractive locales
- update-locale LANG=en_US.UTF-8
- gem install bundler -v $BUNDLER_VERSION
- bundle --version && bundle install --jobs $(nproc) "${FLAGS[@]}" --quiet --path=vendor
- export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
- apt-get update -qq && apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -yqq nodejs
- bundle exec rake db:reset
- bundle exec rake db:setup
- bundle exec rake db:test:prepare
include:
- local: .gitlab/ruby25/base.yml
- local: .gitlab/ruby25/standards.yml
- local: .gitlab/ruby25/rails60.yml
- local: .gitlab/ruby25/pages.yml
- local: .gitlab/ruby25/deployment.yml
# - local: .gitlab/ruby26/base.yml
# - local: .gitlab/ruby26/standards.yml
# - local: .gitlab/ruby26/rails60.yml
# - local: .gitlab/ruby25/rubocops.yml
# - local: .gitlab/ruby27/base.yml
# - local: .gitlab/ruby27/standards.yml
# - local: .gitlab/ruby27/rails60.yml
# - local: .gitlab/ruby26/pages.yml
# - local: .gitlab/ruby26/deployment.yml
# - local: .gitlab/ruby27/pages.yml
# - local: .gitlab/ruby27/deployment.yml
# - local: .gitlab/ruby25/rails52.yml
# - local: .gitlab/ruby25/rails61.yml