Skip to content

Commit

Permalink
Merge pull request #256 from devilbox/release-0.146
Browse files Browse the repository at this point in the history
Release 0.146
  • Loading branch information
cytopia authored Dec 12, 2022
2 parents ff61a45 + 204afad commit 28a4f2a
Show file tree
Hide file tree
Showing 236 changed files with 1,251 additions and 433 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,29 @@ name: build
on:
# Push or pull_request will be determined in jobs.configure.enabled
push:
paths:
- '.ansible/**'
- '.github/workflows/action.yml'
- '.github/workflows/params.yml'
- 'Dockerfiles/**'
- 'php_modules/**'
- 'php_tools/**'
- 'tests/**'
- 'Makefile'
- '!**.md'
- '!.ansible/ansible.cfg'
pull_request:
paths:
- '.ansible/**'
- '.github/workflows/action.yml'
- '.github/workflows/params.yml'
- 'Dockerfiles/**'
- 'php_modules/**'
- 'php_tools/**'
- 'tests/**'
- 'Makefile'
- '!**.md'
- '!.ansible/ansible.cfg'
# Dispatch: allows for manual trigger via GH UI
workflow_dispatch:

Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
## Unreleased


## Release 0.146

This release adds lots of documentation about recently added features.

### Added
- Documentation


## Release 0.145

This is a massive restructuring release, which adds another layer on top of Ansible to easily manage/edit/add PHP tools and to configure their respective order of building and installing.
Expand Down
204 changes: 137 additions & 67 deletions README.md

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion bin/gen-docs-php-tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@
{"name": "**composer**", "dir": "https://getcomposer.org/", "exclude": []},
{"name": "**corepack**", "dir": "https://nodejs.org/api/corepack.html", "exclude": []},
{"name": "**nvm**", "dir": "https://github.com/nvm-sh/nvm", "exclude": []},
{"name": "**npm**", "dir": "https://nodejs.org/en/knowledge/getting-started/npm/what-is-npm/", "exclude": []},
{
"name": "**npm**",
"dir": "https://nodejs.org/en/knowledge/getting-started/npm/what-is-npm/",
"exclude": [],
},
{"name": "**node**", "dir": "https://nodejs.org/en/", "exclude": []},
{"name": "**yarn**", "dir": "https://yarnpkg.com/cli/install", "exclude": []},
{"name": "**pip**", "dir": "https://pypi.org/", "exclude": []},
Expand Down
8 changes: 4 additions & 4 deletions bin/gen-php-modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ def get_module_options(module_dirname: str) -> Dict[str, Any]:
return load_yaml(os.path.join(PHP_MODULE_PATH, module_dirname, "options.yml"))


def get_module_build(module_dirname: str) -> Dict[str, Any]:
"""Returns yaml dict build configuration of a PHP module given by its absolute file path."""
return load_yaml(os.path.join(PHP_MODULE_PATH, module_dirname, "build.yml"))
def get_module_install(module_dirname: str) -> Dict[str, Any]:
"""Returns yaml dict install configuration of a PHP module given by its absolute file path."""
return load_yaml(os.path.join(PHP_MODULE_PATH, module_dirname, "install.yml"))


def get_module_test(module_dirname: str) -> Dict[str, Any]:
Expand Down Expand Up @@ -196,7 +196,7 @@ def write_group_vars(modules: List[str]) -> None:
opts = get_module_options(module)
fp.write(" " + module + ":\n")
fp.write(" disabled: [" + ", ".join(str(x) for x in opts["exclude"]) + "]\n")
fp.write(load_yaml_raw(os.path.join(PHP_MODULE_PATH, module, "build.yml"), 4))
fp.write(load_yaml_raw(os.path.join(PHP_MODULE_PATH, module, "install.yml"), 4))


# --------------------------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions bin/gen-php-tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def get_tool_options(tool_dirname: str) -> Dict[str, Any]:
return load_yaml(os.path.join(PHP_TOOL_PATH, tool_dirname, "options.yml"))


def get_tool_build(tool_dirname: str) -> Dict[str, Any]:
"""Returns yaml dict build configuration of a PHP tool given by its absolute file path."""
def get_tool_install(tool_dirname: str) -> Dict[str, Any]:
"""Returns yaml dict install configuration of a PHP tool given by its absolute file path."""
return load_yaml(os.path.join(PHP_TOOL_PATH, tool_dirname, "install.yml"))


Expand Down
131 changes: 126 additions & 5 deletions doc/available-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,131 @@ Tools |
:information_source: For details on how to generate modules see **[Abuser Documentation: Build your own image](../doc/abuser/README.md)**<br/>


### PHP Tools (`slim`)
### PHP Tools ([`prod`](flavours.md#prod))

The following PHP cli tools are available on the `slim` flavour:
The following PHP cli tools are available on the [`prod`](flavours.md#prod) flavour:

> :information_source: Click on any tool name to find out what they are
<table>
<tr>
<th>Tool</th>
<th>PHP 5.2</th>
<th>PHP 5.3</th>
<th>PHP 5.4</th>
<th>PHP 5.5</th>
<th>PHP 5.6</th>
<th>PHP 7.0</th>
<th>PHP 7.1</th>
<th>PHP 7.2</th>
<th>PHP 7.3</th>
<th>PHP 7.4</th>
<th>PHP 8.0</th>
<th>PHP 8.1</th>
<th>PHP 8.2</th>
</tr>
<tr>
<td><a target="_blank" href="https://linux.die.net/man/8/cron">Cron</a></td>
<td class="tool_prod_cron_5.2">✓</td>
<td class="tool_prod_cron_5.3">✓</td>
<td class="tool_prod_cron_5.4">✓</td>
<td class="tool_prod_cron_5.5">✓</td>
<td class="tool_prod_cron_5.6">✓</td>
<td class="tool_prod_cron_7.0">✓</td>
<td class="tool_prod_cron_7.1">✓</td>
<td class="tool_prod_cron_7.2">✓</td>
<td class="tool_prod_cron_7.3">✓</td>
<td class="tool_prod_cron_7.4">✓</td>
<td class="tool_prod_cron_8.0">✓</td>
<td class="tool_prod_cron_8.1">✓</td>
<td class="tool_prod_cron_8.2">✓</td>
</tr>
<tr>
<td><a target="_blank" href="http://www.postfix.org/">Postfix</a></td>
<td class="tool_prod_postfix_5.2">✓</td>
<td class="tool_prod_postfix_5.3">✓</td>
<td class="tool_prod_postfix_5.4">✓</td>
<td class="tool_prod_postfix_5.5">✓</td>
<td class="tool_prod_postfix_5.6">✓</td>
<td class="tool_prod_postfix_7.0">✓</td>
<td class="tool_prod_postfix_7.1">✓</td>
<td class="tool_prod_postfix_7.2">✓</td>
<td class="tool_prod_postfix_7.3">✓</td>
<td class="tool_prod_postfix_7.4">✓</td>
<td class="tool_prod_postfix_8.0">✓</td>
<td class="tool_prod_postfix_8.1">✓</td>
<td class="tool_prod_postfix_8.2">✓</td>
</tr>
<tr>
<td><a target="_blank" href="http://www.postfix.org/pcre_table.5.html">Postfix PCRE</a></td>
<td class="tool_prod_postfix_pcre_5.2">✓</td>
<td class="tool_prod_postfix_pcre_5.3">✓</td>
<td class="tool_prod_postfix_pcre_5.4">✓</td>
<td class="tool_prod_postfix_pcre_5.5">✓</td>
<td class="tool_prod_postfix_pcre_5.6">✓</td>
<td class="tool_prod_postfix_pcre_7.0">✓</td>
<td class="tool_prod_postfix_pcre_7.1">✓</td>
<td class="tool_prod_postfix_pcre_7.2">✓</td>
<td class="tool_prod_postfix_pcre_7.3">✓</td>
<td class="tool_prod_postfix_pcre_7.4">✓</td>
<td class="tool_prod_postfix_pcre_8.0">✓</td>
<td class="tool_prod_postfix_pcre_8.1">✓</td>
<td class="tool_prod_postfix_pcre_8.2">✓</td>
</tr>
<tr>
<td><a target="_blank" href="https://www.rsyslog.com/">Rsyslog</a></td>
<td class="tool_prod_rsyslog_5.2">✓</td>
<td class="tool_prod_rsyslog_5.3">✓</td>
<td class="tool_prod_rsyslog_5.4">✓</td>
<td class="tool_prod_rsyslog_5.5">✓</td>
<td class="tool_prod_rsyslog_5.6">✓</td>
<td class="tool_prod_rsyslog_7.0">✓</td>
<td class="tool_prod_rsyslog_7.1">✓</td>
<td class="tool_prod_rsyslog_7.2">✓</td>
<td class="tool_prod_rsyslog_7.3">✓</td>
<td class="tool_prod_rsyslog_7.4">✓</td>
<td class="tool_prod_rsyslog_8.0">✓</td>
<td class="tool_prod_rsyslog_8.1">✓</td>
<td class="tool_prod_rsyslog_8.2">✓</td>
</tr>
<tr>
<td><a target="_blank" href="http://www.dest-unreach.org/socat/">Socat</a></td>
<td class="tool_prod_socat_5.2">✓</td>
<td class="tool_prod_socat_5.3">✓</td>
<td class="tool_prod_socat_5.4">✓</td>
<td class="tool_prod_socat_5.5">✓</td>
<td class="tool_prod_socat_5.6">✓</td>
<td class="tool_prod_socat_7.0">✓</td>
<td class="tool_prod_socat_7.1">✓</td>
<td class="tool_prod_socat_7.2">✓</td>
<td class="tool_prod_socat_7.3">✓</td>
<td class="tool_prod_socat_7.4">✓</td>
<td class="tool_prod_socat_8.0">✓</td>
<td class="tool_prod_socat_8.1">✓</td>
<td class="tool_prod_socat_8.2">✓</td>
</tr>
<tr>
<td><a target="_blank" href="http://supervisord.org/">Supervisor</a></td>
<td class="tool_prod_supervisor_5.2">✓</td>
<td class="tool_prod_supervisor_5.3">✓</td>
<td class="tool_prod_supervisor_5.4">✓</td>
<td class="tool_prod_supervisor_5.5">✓</td>
<td class="tool_prod_supervisor_5.6">✓</td>
<td class="tool_prod_supervisor_7.0">✓</td>
<td class="tool_prod_supervisor_7.1">✓</td>
<td class="tool_prod_supervisor_7.2">✓</td>
<td class="tool_prod_supervisor_7.3">✓</td>
<td class="tool_prod_supervisor_7.4">✓</td>
<td class="tool_prod_supervisor_8.0">✓</td>
<td class="tool_prod_supervisor_8.1">✓</td>
<td class="tool_prod_supervisor_8.2">✓</td>
</tr>
</table>


### PHP Tools ([`slim`](flavours.md#slim))

Additionally to all of the `prod` tools shown above, the following PHP cli tools are available on the [`slim`](flavours.md#slim) flavour:

> :information_source: Click on any tool name to find out what they are
Expand Down Expand Up @@ -237,10 +359,9 @@ The following PHP cli tools are available on the `slim` flavour:
> :exclamation: **\[1\]** Not available on `arm64` Docker image.

### PHP Tools ([`work`](flavours.md#work))

### PHP Tools (`work`)

Additionally to all of the `slim` tools shown above, the following PHP cli tools are available on the `work` flavour:
Additionally to all of the `slim` tools shown above, the following PHP cli tools are available on the [`work`](flavours.md#work) flavour:

> :information_source: Click on any tool name to find out what they are
Expand Down
2 changes: 1 addition & 1 deletion doc/base-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Base Images

### Base Images

Have a look at the following Devilbox base images for which no official versions exist yet, but are required to serve as a foundation for this repository:
Have a look at the following Devilbox base images for which no official versions exist yet (as of the time of writing), but are required to serve as a foundation for this repository:

* [PHP-FPM 5.2](https://github.com/devilbox/docker-php-fpm-5.2)
* [PHP-FPM 5.3](https://github.com/devilbox/docker-php-fpm-5.3)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
[PHP Mods: Overview](../../php_modules/README.md) |
[PHP Mods: `options.yml`](PHP-EXT-options.yml.md) |
PHP Mods: `build.yml` |
[PHP Mods: `test.yml`](PHP-EXT-test.yml.md)
PHP Mods: `install.yml`

---

<h2><img name="Documentation" title="Documentation" width="20" src="https://github.com/devilbox/artwork/raw/master/submissions_logo/cytopia/01/png/logo_64_trans.png"> Contributor Documentation: PHP Modules</h2>



# Extension definition: `build.yml`
# Extension definition: `install.yml`


## Top level defines
Expand All @@ -30,16 +29,21 @@ already_avail: "{{ php_all_versions }}"
**Example:** Overwriting `git_ref` for a specific version
```yaml
already_avail: [5.2]
all:
type: git
git_url: https://github.com/phalcon/cphalcon
git_ref: master
# PHP 8.1 is using a different git_ref
8.1:
type: git
git_ref: v1.0.0
# PHP 8.0 is using a different git_ref dynamically with latest tag found
# See the usage of supported shell code
8.0:
type: git
git_ref: $( git tag | sort -V | tail -1 )
```

Expand All @@ -54,7 +58,7 @@ The following keys can be added below: `all`, `8.2`, `8.1`, `8.0`, `7.4`, ...
| `post` | No | Yes | Specify a shell command to be run after module installation. |
| `build_dep` | No | No | Array Debian packages required to build the module (they won't be present in the final image - only used to built the module) If you don't need any, assign it an empty array: `build_dep: []`. |
| `run_dep` | No | No | Array Debian packages required for the module run-time (they won't be present during the build stage - only in the final image). If you don't need any, assign it an empty array: `run_dep: []`. |
| `type` | **Yes** | No | On of the following types to build the module: `builtin`, `pecl`, `git`, `custom`. |
| `type` | **Yes** | No | On of the following types to build the module: `builtin`, `pecl`, `git` or `custom`. |

**Example:**
```yaml
Expand All @@ -66,6 +70,7 @@ all:
rm -f /tmp/file.txt \
build_dep: [libmcrypt-dev]
run_dep: [libmcrypt4]
8.1:
type: builtin
build_dep: []
Expand All @@ -83,9 +88,11 @@ all:
```yaml
all:
type: builtin
8.1:
type: builtin
configure: --with-jpeg --with-png
8.0:
type: builtin
configure: --with-jpeg
Expand All @@ -106,6 +113,7 @@ all:
command: echo "/usr" | pecl install amqp
build_dep: [librabbitmq-dev]
run_dep: [librabbitmq4]
5.5:
type: pecl
version: 1.9.3
Expand All @@ -125,16 +133,22 @@ all:
**Example:**
```yaml
already_avail: [5.2]
# Default for all PHP versions if no overwrite exists
all:
type: git
git_url: https://github.com/phalcon/cphalcon
git_ref: master
# PHP 8.1 is using a different git_ref
# PHP 8.1 is overwriting the git_ref
8.1:
type: git
git_ref: v1.0.0
# PHP 8.0 is using a different git_ref dynamically with latest tag found
# See the usage of supported shell code
8.0:
type: git
git_ref: $( git tag | sort -V | tail -1 )
```

Expand Down Expand Up @@ -166,12 +180,12 @@ all:

**Note:** All keys that support shell code can be written as a single line yaml definition or as a multi line yaml definition. Multi-line yaml definitions need a trailing `\` at the end of each line, including the last line.<br/>
**Single-line:**
```bash
```yaml
all:
pre: VERSION="$( curl http://url | grep -Eo '[0-9.]+' )"
```
**Multi-line:**
```bash
```yaml
all:
pre: |
VERSION="$( \
Expand All @@ -184,7 +198,7 @@ all:

**Note:** All keys that support shell code also support to write multiple shell commands. If you use multiple shell commands, you need to separate them with `&&`.<br/>
**Single-command:**
```bash
```yaml
all:
pre: |
VERSION="$( \
Expand All @@ -193,7 +207,7 @@ all:
)" \
```
**Multi-command:**
```bash
```yaml
all:
pre: |
URL="http://url" \
Expand Down
Loading

0 comments on commit 28a4f2a

Please sign in to comment.