-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
39 lines (35 loc) · 1.29 KB
/
.travis.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
language: node_js
node_js: lts/*
cache:
npm: true
directories:
- frontend/vendor/bower
addons:
ssh_known_hosts:
- dev.riskopendata.org:22027
- index.opendri.org
install:
- cd frontend
- npm ci
- cd ..
- if [ -e id_opendri.enc -a -n "$encrypted_9245de407bbd_iv" ]; then openssl aes-256-cbc -K $encrypted_9245de407bbd_key -iv $encrypted_9245de407bbd_iv -in id_opendri.enc -out /tmp/id_opendri -d && chmod 600 /tmp/id_opendri; fi
script:
- export PYTHONPATH=$(readlink -f ./backend)
- cd frontend
- npm test
- python -m ordd_api.helpers.check_vers $(< ./API_COMPATIBILITY) || (echo '/!\ Backend API and Frontend API are not compatible /!\' && exit 1)
deploy:
- provider: script
skip-cleanup: true
script: git log --pretty=format:'%h%n' -n 1 >> ../infrastructure/git-hash &&
rsync -e "ssh -i /tmp/id_opendri -p 22027" --exclude=node_modules/ --delete-after -r ./ [email protected]:~/html/ &&
rsync -e "ssh -i /tmp/id_opendri -p 22027" --delete-after -r ../infrastructure/ [email protected]:~/infrastructure/
on:
branch: master
- provider: script
skip-cleanup: true
script: rsync -e "ssh -i /tmp/id_opendri" --exclude=node_modules/ --delete-after -r ./ [email protected]:~/html/
on:
tags: true
all-branches: true
condition: $TRAVIS_BRANCH =~ ^fe_