-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
50 lines (44 loc) · 1.44 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
40
41
42
43
44
45
46
47
48
49
50
sudo: true
dist: trusty
language : java
jdk:
- oraclejdk8
services:
- postgresql
- mysql
addons:
apt:
packages:
- sshpass
update: true
jobs:
include:
- stage : compile
script: ./scripts/travis/compile.sh
- stage : test
before_install:
- sudo mysql -e "use mysql; SET PASSWORD FOR 'root'@'localhost' = PASSWORD('P@ssw0rd123');FLUSH PRIVILEGES;"
- sudo mysql -pP@ssw0rd123 -e "create database test_openmrs;"
- sudo mysql -pP@ssw0rd123 -e "CREATE USER 'test_user'@'localhost' IDENTIFIED BY 'P@ssw0rd123';"
- sudo mysql -pP@ssw0rd123 -e "GRANT ALL ON test_openmrs.* to 'test_user'@'localhost';FLUSH PRIVILEGES;"
- sudo service mysql restart
- psql -c "CREATE USER test_user WITH PASSWORD 'password' NOCREATEROLE SUPERUSER;" -U postgres
- psql -c "CREATE DATABASE test_analytics WITH OWNER test_user;" -U postgres
- psql -U test_user test_analytics -c "CREATE SCHEMA bahmni_mart_scdf;"
- sudo service postgresql restart
script: ./scripts/travis/test.sh
- stage: deploy_RPM_to_AWS
script: ./scripts/travis/createRpm.sh
deploy:
provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: bahmni-mart
skip_cleanup: true
local-dir: ./build/distributions
upload-dir: rpms
acl: public_read
stages:
- compile
- test
- deploy_RPM_to_AWS