-
Notifications
You must be signed in to change notification settings - Fork 10
/
BranchPipeline.sh
49 lines (47 loc) · 2.57 KB
/
BranchPipeline.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
echo --------------Schutdown Apache------------------------------------------
#service apache2 stop
echo --------------------------------------------------------------------------
echo ---------------Git pull--------------------------------------------------
echo --------------------------------------------------------------------------
git reset --hard
git pull
mv .Halite.key ./secretStorage/.Halite.key
echo ------------Update parameter.yml and install latest packages-------------
php composer.phar install
echo --------------------------------------------------------------------------
echo ----------------Update Database-------------------------------------------
echo --------------------------------------------------------------------------
php bin/console cache:clear
php bin/console doc:mig:mig -n
php bin/console app:system:repair
echo --------------------------------------------------------------------------
echo -----------------Clear Cache----------------------------------------------
echo --------------------------------------------------------------------------
php bin/console cache:clear
php bin/console cache:warmup
echo --------------------------------------------------------------------------
echo ----------------Setting Permissin-----------------------------------------
echo --------------------------------------------------------------------------
chown -R www-data:www-data var/cache
chmod -R 775 var/cache
echo --------------------------------------------------------------------------
echo ----------------Setting data permissions----------------------------------
echo --------------------------------------------------------------------------
chown -R www-data:www-data data
chmod -R 775 data
echo --------------------------------------------------------------------------
echo ----------------Create Upload Folder and Set permissions------------------
echo --------------------------------------------------------------------------
mkdir public/uploads
mkdir public/uploads/images
chown -R www-data:www-data public/uploads/images
chmod -R 775 public/uploads/images
echo --------------------------------------------------------------------------
echo -----------------------Install NPM and Assets----------------------------
echo --------------------------------------------------------------------------
npm install
npm run build
rm -r node_modules
echo --------------------------------------------------------------------------
echo ---------------------Sucessfully installed or updated---------------------
echo --------------------------------------------------------------------------