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 65cdb1553e
commit a20e610aff
5 changed files with 38 additions and 45 deletions

View File

@@ -12,7 +12,7 @@ before_script:
- sudo rm -rf /etc/mysql/
- sudo bash -c 'echo example.com > /etc/hostname'
- sudo apt-get -qq purge mysql* graphviz*
- sudo apt-get -qq autoremove
- sudo apt-get -qq autoremove --purge
- sudo apt-get update
script:
@@ -20,7 +20,7 @@ script:
- unset LANG
- sudo bash -c 'echo -e "[user]\n\tname = abc\n\temail = root@localhost.com" > /home/travis/.gitconfig'
- sudo echo "Travis Banch = $TRAVIS_BRANCH"
- sudo apt-get install -y --force-yes git python3-setuptools python3-dev python3-apt
- sudo apt-get install -y --force-yes git python3-setuptools python3-dev python3-apt ccze
- sudo bash install $TRAVIS_BRANCH
- sudo wo --help
- sudo wo stack install || sudo tail -n50 /var/log/wo/wordops.log
@@ -30,31 +30,24 @@ script:
- sudo wo site create html.net --html || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create php.com --php || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create mysql.com --mysql || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create site1.com --wp || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create mysql.com --mysql --php73 || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create wp1.com --wp || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create wp1.com --wp --php73 ```|| sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create site2.net --wp --wpsc || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create site4.com --wpfc || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create site4.net --wp --wpfc || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create site4.org --wpfc --wp || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create site5.com --wpsubdir || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create wpsc1.net --wp --wpsc || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create wpfc1.com --wpfc || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create wpfc2.net --wp --wpfc || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create wpfc3.org --wpfc --wp || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create wpsubdir1.com --wpsubdir || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create site6.com --wpsubdir --wpsc || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create site8.com --wpsubdir --wpfc || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create site8.net --wpfc --wpsubdir || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create site9.com --wpsubdomain || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create wpsubdirwpsc1.com --wpsubdir --wpsc || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create wpsubdirwpsc2.com --wpsubdir --wpfc || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create wpsubdirwpfc3.net --wpfc --wpsubdir || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create wpsubdomain1.com --wpsubdomain || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create site10.org --wpsubdomain --wpsc || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create site12.org --wpsubdomain --wpfc || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create site12.in --wpfc --wpsubdomain || sudo tail -n50 /var/log/wo/wordops.log
- yes | sudo wo site create site.hhvm.pagespeed2.com --wpsc --hhvm || sudo tail -n50 /var/log/wo/wordops.log
- yes | sudo wo site create site.hhvm.pagespeed4.com --wpfc --hhvm || sudo tail -n50 /var/log/wo/wordops.log
- yes | sudo wo site create site.hhvm.pagespeed5.com --wpsubdir --hhvm || sudo tail -n50 /var/log/wo/wordops.log
- yes | sudo wo site create site.hhvm.pagespeed6.com --wpsubdir --wpsc --hhvm || sudo tail -n50 /var/log/wo/wordops.log
- yes | sudo wo site create site.hhvm.pagespeed8.com --wpsubdir --wpfc --hhvm || sudo tail -n50 /var/log/wo/wordops.log
- yes | sudo wo site create site.hhvm.pagespeed9.com --wpsubdomain --hhvm || sudo tail -n50 /var/log/wo/wordops.log
- yes | sudo wo site create site.hhvm.pagespeed10.org --wpsubdomain --wpsc --hhvm || sudo tail -n50 /var/log/wo/wordops.log
- yes | sudo wo site create site.hhvm.pagespeed12.in --wpfc --wpsubdomain --hhvm || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create wpsubdomainwpsc.org --wpsubdomain --wpsc || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create wpsubdomainwpfc.org --wpsubdomain --wpfc || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create wpsubdomainwpfc2.in --wpfc --wpsubdomain || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create site1.localtest.me --php --mysql || sudo tail -n50 /var/log/wo/wordops.log
- sudo wo site create site2.localtest.me --mysql --html || sudo tail -n50 /var/log/wo/wordops.log
@@ -101,4 +94,4 @@ script:
- sudo ls /var/www/
- sudo wp --allow-root --info
- sudo bash -c 'cat /var/log/wo/wordops.log'
- sudo bash -c 'cat /var/log/wo/wordops.log | ccze -A'

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;
}
}