-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
78 lines (69 loc) · 1.32 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
cache:
key: "ruby25"
paths:
- vendor
variables:
RSPEC_RETRY_RETRY_COUNT: "3"
before_script:
- source ./scripts/prepare_build.sh
- ruby -v
- which ruby
- retry bundle install --path vendor/bundle --without production --jobs $(nproc) "${FLAGS[@]}"
- bin/rails db:environment:set RAILS_ENV=test
stages:
- test
- security
- staging
- production
rspec:
stage: test
script:
- RAILS_ENV=test bundle exec rake db:drop db:create db:schema:load db:migrate db:seed
- RAILS_ENV=test SIMPLECOV=true xvfb-run -a bundle exec rspec
tags:
- ruby2.5
rubocop:
stage: test
script:
- bundle exec rubocop
tags:
- ruby2.5
brakeman:
stage: security
script:
- bundle exec brakeman
tags:
- ruby2.5
bundler:audit:
stage: security
only:
- master
- staging
script:
- "bundle exec bundle-audit update"
- "bundle exec bundle-audit check --ignore CVE-2017-8418"
tags:
- ruby2.5
deploy_staging:
stage: staging
environment:
name: staging
url: $WAVES_STAGING_URL
only:
- staging
script:
- bundle exec cap staging deploy
tags:
- ruby2.5
deploy_production:
stage: production
environment:
name: production
url: $WAVES_PRODUCTION_URL
only:
- production
when: manual
script:
- bundle exec cap production deploy
tags:
- ruby2.5