Add color steps to travis
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
# WordOps travis testing script
|
||||
#
|
||||
#
|
||||
CSI='\033['
|
||||
CEND="${CSI}0m"
|
||||
CGREEN="${CSI}1;32m"
|
||||
|
||||
exit_script() {
|
||||
tar -I pigz -cf wordops.tar.gz /var/log/wo
|
||||
@@ -16,26 +19,38 @@ if ! {
|
||||
exit_script
|
||||
fi
|
||||
if ! {
|
||||
echo -e "${CGREEN}#############################################${CEND}"
|
||||
echo -e ' Simple site create '
|
||||
echo -e "${CGREEN}#############################################${CEND}"
|
||||
wo site create html.net --html && wo site create php.com --php && wo site create mysql.com --mysql && wo site create proxy.com --proxy=127.0.0.1:3000
|
||||
wo site create wp1.com --wp && wo site create wpsc1.net --wpsc && wo site create wpfc1.com --wpfc
|
||||
wo site create wpsc-php73.net --wpsc --php73 && wo site create wpfc-php73.net --wpfc --php73
|
||||
wo site create wprocket.net --wprocket && wo site create wprocket-php73.net --wprocket --php73
|
||||
wo site create wpce.net --wpce && wo site create wpce-php73.net --wpce --php73
|
||||
wo site create wpredis.net --wpredis && wo site create wpredis-php73.net --wpredis --php73
|
||||
wo site create wpsubdir1.com --wpsubdir && wo site create wpsubdir-php73.com --wpsubdir --php73
|
||||
|
||||
}; then
|
||||
exit_script
|
||||
fi
|
||||
if ! {
|
||||
echo -e "${CGREEN}#############################################${CEND}"
|
||||
echo -e ' Multi-site create '
|
||||
echo -e "${CGREEN}#############################################${CEND}"
|
||||
wo site create wpsubdir1.com --wpsubdir && wo site create wpsubdir-php73.com --wpsubdir --php73
|
||||
wo site create wpsubdirwpsc1.com --wpsubdir --wpsc && wo site create wpsubdirwpsc2.com --wpsubdir --wpfc && wo site create wpsubdirwpsc1-php73.com --wpsubdir --wpsc --php73 && wo site create wpsubdirwpsc2-php73.com --wpsubdir --wpfc --php73
|
||||
wo site create wpsubdomain1.com --wpsubdomain && wo site create wpsubdomain1-php73.com --wpsubdomain --php73 && wo site create wpsubdomainwpsc.org --wpsubdomain --wpsc && wo site create wpsubdomainwpfc.org --wpsubdomain --wpfc && wo site create wpsubdomainwpfc2.in --wpfc --wpsubdomain
|
||||
|
||||
echo -e "${CGREEN}#############################################${CEND}"
|
||||
echo -e ' wo site update '
|
||||
echo -e "${CGREEN}#############################################${CEND}"
|
||||
wo site create 1.com --html && wo site create 2.com --php && wo site create 3.com --mysql
|
||||
wo site update 1.com --wp && wo site update 2.com --php73 && wo site update 3.com --php73 && wo site update 1.com --wpfc && wo site update 1.com --wpsc && wo site update 1.com --wpredis
|
||||
}; then
|
||||
exit_script
|
||||
fi
|
||||
if ! {
|
||||
echo -e "${CGREEN}#############################################${CEND}"
|
||||
echo -e ' wo stack upgrade '
|
||||
echo -e "${CGREEN}#############################################${CEND}"
|
||||
wo stack upgrade --force
|
||||
wo stack upgrade --php --force
|
||||
wo stack upgrade --netdata --force
|
||||
@@ -45,7 +60,9 @@ if ! {
|
||||
}; then
|
||||
exit_script
|
||||
fi
|
||||
|
||||
echo -e "${CGREEN}#############################################${CEND}"
|
||||
echo -e ' various informations '
|
||||
echo -e "${CGREEN}#############################################${CEND}"
|
||||
wp --allow-root --info
|
||||
cat /etc/nginx/nginx.conf
|
||||
wo site info wp1.com
|
||||
|
||||
@@ -182,32 +182,31 @@ def post_pref(self, apt_packages, packages):
|
||||
wo_nginx.write('fastcgi_param \tSCRIPT_FILENAME '
|
||||
'\t$request_filename;\n')
|
||||
|
||||
if os.path.isfile('/etc/nginx/nginx.conf'):
|
||||
data = dict(php="9000", debug="9001",
|
||||
data = dict(php="9000", debug="9001",
|
||||
php7="9070", debug7="9170")
|
||||
WOTemplate.tmpl_render(
|
||||
self, '{0}/upstream.conf'.format(ngxcnf),
|
||||
'upstream.mustache', data, overwrite=True)
|
||||
WOTemplate.tmpl_render(
|
||||
self, '{0}/upstream.conf'.format(ngxcnf),
|
||||
'upstream.mustache', data, overwrite=True)
|
||||
|
||||
data = dict(phpconf=True if
|
||||
WOAptGet.is_installed(self, 'php7.2-fpm')
|
||||
else False)
|
||||
WOTemplate.tmpl_render(self,
|
||||
'{0}/stub_status.conf'.format(ngxcnf),
|
||||
'stub_status.mustache', data)
|
||||
data = dict()
|
||||
WOTemplate.tmpl_render(self,
|
||||
'{0}/webp.conf'.format(ngxcnf),
|
||||
'webp.mustache', data)
|
||||
data = dict(phpconf=True if
|
||||
WOAptGet.is_installed(self, 'php7.2-fpm')
|
||||
else False)
|
||||
WOTemplate.tmpl_render(self,
|
||||
'{0}/stub_status.conf'.format(ngxcnf),
|
||||
'stub_status.mustache', data)
|
||||
data = dict()
|
||||
WOTemplate.tmpl_render(self,
|
||||
'{0}/webp.conf'.format(ngxcnf),
|
||||
'webp.mustache', data)
|
||||
|
||||
WOTemplate.tmpl_render(self,
|
||||
'{0}/cloudflare.conf'.format(ngxcnf),
|
||||
'cloudflare.mustache', data)
|
||||
WOTemplate.tmpl_render(self,
|
||||
'{0}/cloudflare.conf'.format(ngxcnf),
|
||||
'cloudflare.mustache', data)
|
||||
|
||||
WOTemplate.tmpl_render(self,
|
||||
'{0}/map-wp-fastcgi-cache.conf'.format(
|
||||
ngxcnf),
|
||||
'map-wp.mustache', data)
|
||||
WOTemplate.tmpl_render(self,
|
||||
'{0}/map-wp-fastcgi-cache.conf'.format(
|
||||
ngxcnf),
|
||||
'map-wp.mustache', data)
|
||||
|
||||
# Setup Nginx common directory
|
||||
if not os.path.exists('{0}'.format(ngxcom)):
|
||||
|
||||
Reference in New Issue
Block a user