-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
46 lines (38 loc) · 1.34 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
dist: bionic
language: java
cache:
directories:
- "$HOME/.m2"
env:
- CI=false
script:
- cd backend && mvn test
after_success:
- mvn -Dremote.user=$REMOTE_USER -Dremote.password=$REMOTE_PW tomcat7:deploy -DskipTests
- cd ../frontend && npm install && npm run deploy
services:
- mysql
before_script:
- sudo apt-get update || true
- sudo apt-get install -y debconf-utils
- sudo debconf-set-selections <<< 'mysql-apt-config mysql-apt-config/select-server
select mysql-8.0'
- wget https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb
- sudo -E dpkg -i mysql-apt-config_0.8.13-1_all.deb
- sudo apt-get update || true
- echo "Installing MySQL 8..."
- sudo -E apt-get -y install mysql-server
- sudo mysql -u root -e "CREATE User 'dev'@'localhost' IDENTIFIED BY 'ax2'; GRANT
ALL PRIVILEGES ON *.* TO 'dev'@'localhost' WITH GRANT OPTION;"
- sudo mysql -u dev -pax2 -e "CREATE DATABASE startcode_test;"
- mysql --version
- echo "before_script Complete"
before_install:
- openssl aes-256-cbc -K $encrypted_dfdcfd5172af_key -iv $encrypted_dfdcfd5172af_iv
-in deploy_key.enc -out ./deploy_key -d
- eval "$(ssh-agent -s)"
- chmod 600 ./deploy_key
- echo -e "Host eenielsen.dk\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- ssh-add ./deploy_key
# test ssh connection for: https://github.com/dwyl/learn-travis/issues/42
- ssh -i ./deploy_key [email protected] pwd