Commit fdccda38 authored by Chris Croome's avatar Chris Croome

test enable tests

parent b50160ba
Pipeline #3495 failed with stage
in 1 minute and 47 seconds
# Debian Stretch PHP
This repo contains GitLab CI instructions to install Ansible and copy a GPG secret file to the CI Docker container and then run an Ansible playbooks, `run.yml`, which runs three roles:
This repo contains GitLab CI instructions to install Ansible and GPG and SSH secret keys to a Docker container and then run an Ansible playbook, `run.yml`, which runs three roles:
1. The build role download source debs for PHP, set the file descriptors limit to a higher value and then rebuilds and signs them and create a apt repo layout.
2. The test role then installs the debs that have been built to test that they can be installed without errors (currently not enabled).
1. The build role download source debs for PHP, set the file descriptors limit to a higher value and then rebuilds and signs them and creates a apt repo layout.
2. The test role then installs the debs that have been built to test that they can be installed without errors and also checks the complied value of `enable-fd-setsize`.
3. The deploy role `rsync`'s the files to the apt repo.
The apt repo that this code generates is available at [deb.webarch.net](https://deb.webarch.net/).
The apt repo that this code generates is available at [deb.webarch.net](https://deb.webarch.net/), where you can also find instructions for using it.
The variables in `run.yml` would need changing if these playbooks are used elsewhere for used for building other packages.
The variables in `run.yml` would need changing if these playbooks are used elsewhere or used for building other packages.
# PHP File Descriptors Limit
......@@ -30,7 +30,15 @@ Filename: src/SMTP.php
Line Number: 1124
```
Our shared hosting servers use a lot of file descriptors, for example this total number of open file handles of any sort:
Check your installed PHP for the value of `enable-fd-setsize`:
```
apt install php7.0-dev
php-config --configure-options | sed 's/\s\+/\n/g' | grep enable-fd-setsize
--enable-fd-setsize=1024
```
Our shared hosting servers use a lot of file descriptors, for example the total number of open file handles of any sort:
```bash
lsof | wc -l
......
......@@ -39,8 +39,9 @@ apt update<br />
apt dist-upgrade
</code></pre>
<!--#include virtual="/wsh/bot.shtml" -->
<h2 id="code>Code</h2>
<h2 id="code">Code</h2>
<p>The code that was used to rebuild the PHP{{ php_version }} packages for Debian {{ php_distro }} and build this aot repo is <a href="https://git.coop/webarch/php">available on git.coop</a>.</p>
<!--#include virtual="/wsh/bot.shtml" -->
......@@ -6,24 +6,27 @@
state: present
- name: Add local repo to sources
shell: echo 'deb file:/build/repo ./' > /etc/apt/sources.list.d/local.list
shell: echo 'deb file:/build/repo {{ php_distro }} main' > /etc/apt/sources.list.d/local.list
- name: Install Apache and PHP
- name: Get the version number we want to install
shell: ls /build/repo/pool/main/p/php{{ php_version }}/php7.0_*.deb | sed 's;^/build/repo/pool/main/p/php{{ php_version }}/php7.0_;;' | sed 's/_all.deb$//'
register: php_deb_version
args:
- warn: no
- name: Install PHP Dev package
apt:
pkg:
- apache2
- "php{{ php_version }}"
- "php{{ php_version }}-bcmath"
- "php{{ php_version }}-curl"
- "php{{ php_version }}-gd"
- "php{{ php_version }}-geoip"
- "php{{ php_version }}-imagick"
- "php{{ php_version }}-imap"
- "php{{ php_version }}-intl"
- "php{{ php_version }}-mcrypt"
- "php{{ php_version }}-mysqli"
- "php{{ php_version }}-sqlite3"
- "php{{ php_version }}-uploadprogress"
- "php{{ php_version }}-xmlrpc"
- "php{{ php_version }}-dev={{ php_deb_version.stdout }}"
state: latest
update_cache: yes
- name: Get the enable-fd-setsize configure option from the installed package
shell: php-config --configure-options | sed 's/\s\+/\n/g' | grep enable-fd-setsize | sed 's/^--enable-fd-setsize=//'
register: php_fd_size
args:
- warn: no
- name: Fail if the installed version of PHP doesn't have the correct number of file descriptors enabled
fail:
when: php_sockets != php_fd_size.stdout
......@@ -4,7 +4,7 @@
vars:
php_version: 7.0
php_sockets: 10240
php_sockets: 1024000
php_distro: stretch
php_repo_domain: deb.webarch.net
php_release_email: deb@webarch.net
......@@ -14,5 +14,5 @@
roles:
- build
# - test
- test
- deploy
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment