forked from esethna/mattermost-selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-for-run.sh
executable file
·56 lines (38 loc) · 2.7 KB
/
setup-for-run.sh
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
#!/bin/bash
sudo systemctl stop mattermost
tar czPf ~/logs/archive-pre-$BUILD_ID.tar.gz ~/mattermost/logs
cp -f ~/mattermost/logs/mattermost.log $WORKSPACE/mm-latest.log
rm -f mattermost.tar.gz
# Regular daily
wget https://releases.mattermost.com/mattermost-platform/master/mattermost-enterprise-linux-amd64.tar.gz
mv mattermost-enterprise-linux-amd64.tar.gz mattermost.tar.gz
# Use this to lock to specific version
# wget https://releases.mattermost.com/4.7.0/mattermost-4.7.0-linux-amd64.tar.gz
# mv mattermost-4.7.0-linux-amd64.tar.gz mattermost.tar.gz
rm -rf ~/mattermost
mkdir -p ~/mattermost
tar -C ~/ -xzf mattermost.tar.gz
cp ~/config.json ~/mattermost/config/config.json
cp ~/mattermost.mattermost-license ~/mattermost/config/mattermost.mattermost-license
cd ~/mattermost
./bin/platform reset --confirm true
./bin/platform user create --email admin@test.com --username admin --password passwd
./bin/platform user create --email test@test.com --username test --password passwd
./bin/platform user create --email test2@test.com --username test2 --password passwd
./bin/platform user create --email test3@test.com --username test3 --password passwd
./bin/platform user create --email test4@test.com --username test4 --password passwd
./bin/platform user create --email test5@test.com --username test5 --password passwd
./bin/platform user create --email test6@test.com --username test6 --password passwd
./bin/platform user create --email test7@test.com --username test7 --password passwd
./bin/platform user create --email test8@test.com --username test8 --password passwd
./bin/platform user create --email test9@test.com --username test9 --password passwd
./bin/platform user create --email test10@test.com --username test10 --password passwd
./bin/platform team create --name ui-automation --display_name "UI Automation" --email "test2@test.com"
./bin/platform team add ui-automation admin@test.com test@test.com test2@test.com test3@test.com test4@test.com test5@test.com test6@test.com test7@test.com test8@test.com test9@test.com test10@test.com
./bin/platform team create --name ui-automation2 --display_name "UI Automation 2" --email "test6@test.com" --private=false
./bin/platform team add ui-automation2 admin@test.com test5@test.com test6@test.com test7@test.com test8@test.com test9@test.com test10@test.com
./bin/platform user create --email corey@test.com --username corey --password passwd
./bin/platform team add ui-automation corey@test.com
mysql -u mmuser -ppasswd -h localhost -e "UPDATE Preferences SET Value = '999' WHERE Category = 'tutorial_step';" mattermost
mysql -u mmuser -ppasswd -h localhost -e "UPDATE Teams SET AllowOpenInvite = '1' WHERE Name = 'ui-automation2';" mattermost
sudo systemctl start mattermost