forked from Molinos/adminos_example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
51 lines (47 loc) · 1003 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
variables:
RAILS_ENV: test
before_script:
- rvm install $(cat .ruby-version)
- rvm use $(cat .ruby-version)
- gem install bundler --no-ri --no-rdoc
- bundle config build.pg --with-pg-config=/usr/pgsql-9.4/bin/pg_config
- bin/setup
cache:
untracked: true
paths:
- node_modules
deploy to staging:
stage: deploy
script:
- eval $(ssh-agent -s)
- ssh-add <(echo -e "$SSH_STAGING_KEY")
- bin/cap staging deploy
only:
refs: [develop]
when: manual
environment:
name: staging
url: http://staging.example.test
deploy to production:
stage: deploy
script:
- eval $(ssh-agent -s)
- ssh-add <(echo -e "$SSH_PRODUCTION_KEY")
- bin/cap production deploy
only:
refs: [master]
when: manual
environment:
name: production
url: http://example.test
audit:
script: bin/rake bundle:audit
spec:
script: bin/rake spec
artifacts:
paths:
- coverage/
- spec/examples.txt
lint:
script: bin/rubocop
allow_failure: true