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 [email protected] --username admin --password passwd
./bin/platform user create --email [email protected] --username test --password passwd
./bin/platform user create --email [email protected] --username test2 --password passwd
./bin/platform user create --email [email protected] --username test3 --password passwd
./bin/platform user create --email [email protected] --username test4 --password passwd
./bin/platform user create --email [email protected] --username test5 --password passwd
./bin/platform user create --email [email protected] --username test6 --password passwd
./bin/platform user create --email [email protected] --username test7 --password passwd
./bin/platform user create --email [email protected] --username test8 --password passwd
./bin/platform user create --email [email protected] --username test9 --password passwd
./bin/platform user create --email [email protected] --username test10 --password passwd
./bin/platform team create --name ui-automation --display_name "UI Automation" --email "[email protected]"
./bin/platform team add ui-automation [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
./bin/platform team create --name ui-automation2 --display_name "UI Automation 2" --email "[email protected]" --private=false
./bin/platform team add ui-automation2 [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
./bin/platform user create --email [email protected] --username corey --password passwd
./bin/platform team add ui-automation [email protected]
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