testing php73 stack

* add new travis test
* remove temporarily few travis test to speed up the build
* --experimental args isn't required anymore
This commit is contained in:
VirtuBox
2019-03-03 14:54:12 +01:00
parent f397509835
commit 838f1c741d
5 changed files with 38 additions and 45 deletions

View File

@@ -455,7 +455,7 @@ class WOSiteCreateController(CementBaseController):
if data and self.app.pargs.php73:
if (self.app.pargs.experimental):
Log.info(self, "Do you wish to install PHP 7.2 now for {0}?".format(wo_domain))
Log.info(self, "Do you wish to install PHP 7.3 now for {0}?".format(wo_domain))
# Check prompt
check_prompt = input("Type \"y\" to continue [n]:")
@@ -899,7 +899,7 @@ class WOSiteUpdateController(CementBaseController):
check_ssl = check_site.is_ssl
check_php_version = check_site.php_version
if check_php_version == "7.2":
if check_php_version == "7.3":
old_php73 = True
else:
old_php73 = False

View File

@@ -711,18 +711,18 @@ def site_package_check(self, stype):
if self.app.pargs.php and self.app.pargs.php73:
Log.error(self,"Error: two different PHP versions cannot be combined within the same WordOps site")
if not self.app.pargs.php73 and stype in ['php', 'mysql', 'wp', 'wpsubdir', 'wpsubdomain']:
Log.debug(self, "Setting apt_packages variable for PHP")
apt_packages = apt_packages + WOVariables.wo_php73 + WOVariables.wo_php_extra
if not self.app.pargs.php and stype in ['php', 'mysql', 'wp', 'wpsubdir', 'wpsubdomain']:
Log.debug(self, "Setting apt_packages variable for PHP 7.2")
apt_packages = apt_packages + WOVariables.wo_php + WOVariables.wo_php_extra
if self.app.pargs.php73 and stype in [ 'mysql', 'wp', 'wpsubdir', 'wpsubdomain']:
if self.app.pargs.php and stype in [ 'mysql', 'wp', 'wpsubdir', 'wpsubdomain']:
if (WOVariables.wo_platform_codename == 'trusty' or WOVariables.wo_platform_codename == 'xenial' or WOVariables.wo_platform_codename == 'bionic'):
Log.debug(self, "Setting apt_packages variable for PHP 7.3")
Log.debug(self, "Setting apt_packages variable for PHP 7.2")
if not WOAptGet.is_installed(self, 'php7.3-fpm'):
apt_packages = apt_packages + WOVariables.wo_php73 + WOVariables.wo_php_extra
apt_packages = apt_packages + WOVariables.wo_php + WOVariables.wo_php_extra
else:
Log.debug(self, "Setting apt_packages variable for PHP 7.3")
if not WOAptGet.is_installed(self, 'php7.3-fpm'):
Log.debug(self, "Setting apt_packages variable for PHP 7.2")
if not WOAptGet.is_installed(self, 'php7.2-fpm'):
apt_packages = apt_packages + WOVariables.wo_php73
if stype in ['mysql', 'wp', 'wpsubdir', 'wpsubdomain']:
@@ -832,7 +832,7 @@ def site_package_check(self, stype):
if self.app.pargs.php73:
if (WOVariables.wo_platform_codename == 'wheezy' or WOVariables.wo_platform_codename == 'precise'):
Log.error(self,"PHP 7.0 is not supported in your Platform")
Log.error(self,"PHP 7.3 is not supported in your Platform")
Log.debug(self, "Setting apt_packages variable for PHP 7.3")
if not WOAptGet.is_installed(self, 'php7.3-fpm'):

View File

@@ -155,12 +155,12 @@ class WOStackController(CementBaseController):
if (WOVariables.wo_platform_codename == 'trusty' or WOVariables.wo_platform_codename == 'xenial' or WOVariables.wo_platform_codename == 'bionic'):
if set(WOVariables.wo_php73).issubset(set(apt_packages)):
Log.info(self, "Adding repository for PHP, please wait...")
Log.info(self, "Adding repository for PHP 7.3, please wait...")
Log.debug(self, 'Adding ppa for PHP')
WORepo.add(self, ppa=WOVariables.wo_php_repo)
else:
if set(WOVariables.wo_php).issubset(set(apt_packages)):
Log.info(self, "Adding repository for PHP, please wait...")
Log.info(self, "Adding repository for PHP 7.2, please wait...")
# Add repository for php
if WOVariables.wo_platform_distro == 'debian':
if WOVariables.wo_platform_codename != 'jessie':
@@ -174,7 +174,7 @@ class WOStackController(CementBaseController):
if WOVariables.wo_platform_codename == 'jessie':
if set(WOVariables.wo_php73).issubset(set(apt_packages)):
Log.debug(self, 'Adding repo_url of php 7.0 for debian')
Log.debug(self, 'Adding repo_url of php 7.3 for debian')
WORepo.add(self, repo_url=WOVariables.wo_php_repo)
Log.debug(self, 'Adding Dotdeb/php GPG key')
WORepo.add_key(self, '89DF5277')
@@ -1397,15 +1397,15 @@ class WOStackController(CementBaseController):
Log.debug(self, "Nginx Stable already installed")
if self.app.pargs.php:
Log.debug(self, "Setting apt_packages variable for PHP")
Log.debug(self, "Setting apt_packages variable for PHP 7.2")
if not (WOAptGet.is_installed(self, 'php5-fpm') or WOAptGet.is_installed(self, 'php7.2-fpm')):
if (WOVariables.wo_platform_codename == 'trusty' or WOVariables.wo_platform_codename == 'xenial' or WOVariables.wo_platform_codename == 'bionic'):
apt_packages = apt_packages + WOVariables.wo_php + WOVariables.wo_php_extra
else:
apt_packages = apt_packages + WOVariables.wo_php
else:
Log.debug(self, "PHP already installed")
Log.info(self, "PHP already installed")
Log.debug(self, "PHP 7.2 already installed")
Log.info(self, "PHP 7.2 already installed")
# PHP 7.3 for Debian (jessie+)
if self.app.pargs.php73 and WOVariables.wo_platform_distro == 'debian':
@@ -1434,9 +1434,9 @@ class WOStackController(CementBaseController):
Log.info(self, "PHP 7.3 already installed")
else:
Log.debug(
self, "Unfortunately PHP 7.3 is not available for your Ubuntu or Debian version.")
self, "Unfortunately PHP 7.3 is not available for your Ubuntu or Debian version.")
Log.info(
self, "Unfortunately PHP 7.3 is not available for your Ubuntu or Debian version.")
self, "Unfortunately PHP 7.3 is not available for your Ubuntu or Debian version.")
if self.app.pargs.hhvm:
Log.debug(self, "Setting apt packages variable for HHVM")

View File

@@ -25,7 +25,7 @@ location /wp-content/uploads {
try_files $uri$webp_suffix $uri =404;
}
location ~ \.php$ {
#Prevent Direct Access Of PHP Files From Web Browsers
#Prevent Direct Access Of PHP Files From Web Browsers
deny all;
}
}