-
Notifications
You must be signed in to change notification settings - Fork 42
/
.gitlab-ci.yml
51 lines (45 loc) · 998 Bytes
/
.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
.rspec: &rspec
stage: test
tags:
- docker
before_script:
- "echo 'gem: --no-document' > ~/.gemrc"
- gem install bundler
- 'git -v || apk --update add git'
- bundle install -j $(nproc)
script:
- ./bin/rspec
rspec ruby-2.4:
image: ruby:2.4-alpine
<<: *rspec
rspec ruby-2.5:
image: ruby:2.5-alpine
<<: *rspec
rspec ruby-2.6:
image: ruby:2.6-alpine
<<: *rspec
rspec ruby-2.7:
image: ruby:2.7-rc-alpine
<<: *rspec
rspec jruby-9.2:
image: jruby:9.2-alpine
<<: *rspec
only:
- master
- tags
release:
stage: deploy
image: ruby:2.6-alpine
tags:
- docker
script:
- "echo 'gem: --no-document' > ~/.gemrc"
- gem install bundler
- 'git -v || apk --update add git'
- bundle install -j $(nproc)
- 'ruby -ryaml -e "puts YAML.dump({rubygems_api_key: ENV.fetch(%{RUBYGEMS_API_KEY})})" > ~/.gem/credentials'
- chmod 600 ~/.gem/credentials
- bundle exec rake release
only:
- tags
environment: production