-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
42 lines (39 loc) · 1.22 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
# Note : we are currently using this file with a machine already having rbenv and ruby-build installed
# every other required dependency, with the shell executor to deploy locally
# Yes, it deploys in development environment.
# This step has to be manually triggered whenever you make a change to Gemfile
setup_env:
when: manual
tags:
- projet-tracker-vm
script:
- id
- rbenv install -f 2.4.0
- export PATH="$HOME/.rbenv/bin:$PATH"
- eval "$(rbenv init -)"
- rbenv global 2.4.0
- ruby -v
- gem install bundler
- rbenv rehash
- bundle install
- rbenv rehash
- echo 'export PATH="$HOME/.rbenv/bin:$PATH"' > $HOME/.bashrc
- echo 'eval "$(rbenv init -)"' >> $HOME/.bashrc
# - rails db:setup # /!\ resets the DB
# Run tests
rspec:
tags:
- projet-tracker-vm
script:
- bundle exec rspec
# Deploy the dev instance of the code
# deploy_dev:
# tags:
# - projet-tracker-vm
# script:
# - if `tmux has-session -t tracker-dev` ; then `tmux kill-session -t tracker-dev`; fi
# - rm -rf $HOME/tracker-dev-instance
# - cp -r . $HOME/tracker-dev-instance
# - cd $HOME/tracker-dev-instance
# - rails db:migrate
# - tmux new-session -s tracker-dev -d rails server