-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathupdate-cppcomet.yml
81 lines (62 loc) · 2.02 KB
/
update-cppcomet.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
# Обновляет комет сервер установленный командой make install
- hosts: all
vars:
remote_user: root
tasks:
- name: Update
apt: update_cache=yes
- name: Installing deps
apt:
name: curl,wget
state: present
- name: add nodejs
shell:
cmd: curl -sL https://deb.nodesource.com/setup_6.x | bash -
- name: Update
apt: update_cache=yes
- name: Installing deps
apt:
name: cmake,make,cpp,gcc,libssl-dev,g++,nginx,pkg-config,libmariadbclient-dev-compat,mysql-client,flex,mailutils,uuid-dev,git,curl,wget,nodejs,build-essential,lcov,valgrind
state: present
- name: Make backup dir
shell:
cmd: mkdir /root/cppcomet-back --parent
- name: Config backup
raw: date +"/root/cppcomet-back/cppcomet-%s" | xargs cp /usr/bin/cppcomet
# Получение кода
- name: Git clone
raw: rm -rf /tmp/CppComet-last && mkdir /tmp/CppComet-last && cd /tmp/CppComet-last && git clone -q -b {{git_branch}} {{git_cppcomet_repo_url}} ./
- name: Cmake Build
shell:
chdir: /tmp/CppComet-last
cmd: cmake .
- name: Make Build
shell:
chdir: /tmp/CppComet-last
cmd: make
- name: Config copy
shell:
cmd: cp /etc/comet-server/comet.ini /tmp/CppComet-last/comet.ini
- name: Install
shell:
chdir: /tmp/CppComet-last
cmd: make install
- name: restart
shell:
cmd: service comet restart
# Тесты версии
- name: Add +x
shell:
cmd: chmod +x /tmp/CppComet-last/coverage/fulltests.sh
- name: Installing deps
shell:
chdir: /tmp/CppComet-last/coverage
cmd: npm install -g istanbul websocket mysql
- name: Run tests
shell:
chdir: /tmp/CppComet-last/coverage
cmd: ./onlyJsTests.sh > /tmp/last-js-test.log
ignore_errors: yes
- name: cat tests log
raw: cat /tmp/last-js-test.log | grep -A 4 "Coverage summary"