Skip to content

Commit d3c1e32

Browse files
committed
[travis] deploy script
1 parent 53cb3e1 commit d3c1e32

File tree

3 files changed

+29
-19
lines changed

3 files changed

+29
-19
lines changed

.travis.yml

+23-19
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,35 @@
11
language: nodejs
2-
node_js: "6"
2+
node_js: '6'
33
services:
4-
- mongodb
4+
- mongodb
55
env:
6-
- CXX=g++-4.8
6+
global:
7+
- secure: ZXdUMP+8Nk9Kd5nX31D/DIB1t2xlJd+T4W7umWjwpy+KPA9d1W1OhUG6V2Gpv3PsJf+UtMosgZsywcLFVG4l/WcjAhs3c9pegW5ZRYAEfVjkk7aHhWQGvj5DID8iAAxs91Mm8LwJ43o68x+XN6746zArPqcVzQltDunJ0G3gfh8=
78
branches:
89
except:
9-
- gh-pages
10-
env:
11-
global:
12-
- secure: ZXdUMP+8Nk9Kd5nX31D/DIB1t2xlJd+T4W7umWjwpy+KPA9d1W1OhUG6V2Gpv3PsJf+UtMosgZsywcLFVG4l/WcjAhs3c9pegW5ZRYAEfVjkk7aHhWQGvj5DID8iAAxs91Mm8LwJ43o68x+XN6746zArPqcVzQltDunJ0G3gfh8=
13-
before_install: sudo bash ./bin/countly.install_travis.sh
10+
- gh-pages
11+
before_install:
12+
- openssl aes-256-cbc -K $encrypted_ff67a7dd600a_key -iv $encrypted_ff67a7dd600a_iv
13+
-in deploy-key.enc -out deploy-key -d
14+
- chmod 600 deploy-key
15+
- mv deploy-key ~/.ssh/id_rsa
16+
- sudo bash ./bin/countly.install_travis.sh
1417
install: sudo npm install
1518
before_script:
16-
- nodejs --version
17-
- mongod --version
18-
- cat /var/log/mongodb/mongod.log
19-
- until nc -z localhost 27017; do echo Waiting for MongoDB; sleep 1; done
19+
- nodejs --version
20+
- mongod --version
21+
- cat /var/log/mongodb/mongod.log
22+
- until nc -z localhost 27017; do echo Waiting for MongoDB; sleep 1; done
2023
script: sudo npm test
21-
after_script:
22-
- cat log/countly-api.log
23-
- cat log/countly-dashboard.log
24-
- cat /var/log/mongodb/mongod.log
24+
after_script:
25+
- cat log/countly-api.log
26+
- cat log/countly-dashboard.log
27+
- cat /var/log/mongodb/mongod.log
2528
after_success:
26-
- cd $TRAVIS_BUILD_DIR
27-
- chmod +x bin/scripts/generateDocs.sh
28-
- bash bin/scripts/generateDocs.sh
29+
- cd $TRAVIS_BUILD_DIR
30+
- ssh [email protected] 'bash -s' < bin/scripts/deploy.sh
31+
- chmod +x bin/scripts/generateDocs.sh
32+
- bash bin/scripts/generateDocs.sh
2933
notifications:
3034
3135
slack:

bin/scripts/deploy.sh

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
cd /home/countly;
4+
git pull;
5+
countly upgrade
6+
bash bin/config/countly_user.sh

deploy-key.enc

1.65 KB
Binary file not shown.

0 commit comments

Comments
 (0)