-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
126 lines (98 loc) · 3.02 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
# We are using the Satorix Rails CI image from https://hub.docker.com/r/satorix/rails/
image: 'satorix/rails:18'
# Global caching directives.
cache:
key: "$CI_PROJECT_ID"
paths:
- 'tmp/satorix/cache' # To cache buildpack gems between runs.
###############################################################################
#
# Below are resources that will be available as part of the CI pipeline.
# Uncomment the resources matching the testing requirements of your application.
# Feel free to delete unused/unwanted resource entries.
#
###############################################################################
# Configure postgresql environment variables (https://hub.docker.com/r/_/postgres/)
# These defaults should work well for all implementations.
.use_postgres: &use_postgres
services:
- postgres:11.0
variables:
DB_HOST: postgres
POSTGRES_DB: test
POSTGRES_PASSWORD: password
POSTGRES_USER: root
## https://github.com/flynn/flynn/issues/3505
## https://hub.docker.com/r/_/mariadb/
## These defaults should work well for all implementations.
#.use_mariadb: &use_mariadb
# services:
# - mariadb:10.1
# variables:
# DB_HOST: mariadb
# MYSQL_DATABASE: test
# MYSQL_ROOT_PASSWORD: password # The default user is: root
#
## https://github.com/flynn/flynn/issues/3505
## https://hub.docker.com/r/_/mysql/
## These defaults should work well for all implementations.
#.use_mysql: &use_mysql
# services:
# - mysql:5.7
# variables:
# DB_HOST: mysql
# MYSQL_DATABASE: test
# MYSQL_ROOT_PASSWORD: password # The default user is: root
.satorix: &satorix
<<: *use_postgres
script:
- gem install satorix --no-document
- satorix
###############################################################################
#
# Below are jobs that will run as part of the CI pipeline.
# Uncomment the jobs you want to use for your application.
# Feel free to delete unused/unwanted job entries.
#
###############################################################################
# Brakeman
# Static analysis security scanner for Ruby on Rails
# http://brakemanscanner.org/
brakeman:
<<: *satorix
# bundler-audit
# Patch-level verification for Bundler
# https://github.com/rubysec/bundler-audit
bundler_audit:
<<: *satorix
## Cucumber
## Executes executable specifications written in plain language
## https://github.com/cucumber/cucumber
#cucumber:
# <<: *use_postgres
# <<: *satorix
## Rails test
## Built-in mechanisms in Rails for testing your application
## http://guides.rubyonrails.org/testing.html
#rails_test:
# <<: *use_postgres
# <<: *satorix
# RSpec
# Behaviour Driven Development for Ruby
# http://rspec.info/
rspec:
<<: *satorix
# RuboCop
# A Ruby static code analyzer, based on the community Ruby style guide.
# https://github.com/bbatsov/rubocop
rubocop:
<<: *satorix
deploy_with_flynn:
environment:
name: $CI_COMMIT_REF_NAME
url: "http://$CI_PROJECT_NAME.$CI_COMMIT_REF_SLUG.$SATORIX_HOSTING_NAMESPACE"
stage: deploy
only:
- staging
- production
<<: *satorix