From e199124ca6ff1624e5d6cc01f3098eb9070b04bd Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 29 Nov 2022 06:51:50 +0100 Subject: [PATCH] Add documentation directory --- .../PHP-EXT-build.yml.md | 0 .../PHP-EXT-options.yml.md | 0 .../PHP-EXT-test.yml.md | 0 php_modules/README.md | 24 ++++++++++--------- php_modules/modules-generate.py | 1 - php_modules/modules-validate.py | 1 - 6 files changed, 13 insertions(+), 13 deletions(-) rename php_modules/README-build.yml.md => doc/PHP-EXT-build.yml.md (100%) rename php_modules/README-options.yml.md => doc/PHP-EXT-options.yml.md (100%) rename php_modules/README-test.yml.md => doc/PHP-EXT-test.yml.md (100%) delete mode 120000 php_modules/modules-generate.py delete mode 120000 php_modules/modules-validate.py diff --git a/php_modules/README-build.yml.md b/doc/PHP-EXT-build.yml.md similarity index 100% rename from php_modules/README-build.yml.md rename to doc/PHP-EXT-build.yml.md diff --git a/php_modules/README-options.yml.md b/doc/PHP-EXT-options.yml.md similarity index 100% rename from php_modules/README-options.yml.md rename to doc/PHP-EXT-options.yml.md diff --git a/php_modules/README-test.yml.md b/doc/PHP-EXT-test.yml.md similarity index 100% rename from php_modules/README-test.yml.md rename to doc/PHP-EXT-test.yml.md diff --git a/php_modules/README.md b/php_modules/README.md index 5df4bf0..7635150 100644 --- a/php_modules/README.md +++ b/php_modules/README.md @@ -1,8 +1,8 @@ # PHP Module definitions -This documentation describes how to create new or alter existing PHP module definitions. +This document describes how to create new or alter existing PHP module definitions. -All PHP modules/extensions (for all PHP versions and both for `amd64` and `arm64` platforms) are defined in here in their dedicated directory. These definitions are then transformed to Ansible group_vars and afterwards Ansible will generate the corresponding Dockerfiles (Stage: `mods`). +All PHP modules/extensions (for all PHP versions and both for `amd64` and `arm64` platforms) are defined in the `php_modules/` directory in their corresponding sub directory. These definitions are then transformed to Ansible group_vars and afterwards Ansible will generate the corresponding Dockerfiles (Stage: `mods`). ## How to add PHP modules? @@ -11,32 +11,34 @@ All PHP modules/extensions (for all PHP versions and both for `amd64` and `arm64 1. Create a new directory with the name of the PHP module in `php_modules/` 2. Add `build.yml`, `options.yml` and `test.yml` into your newly created directory 3. Alter `build.yml`, `options.yml` and `test.yml` according to documentation below - 4. Run `python3 modules-validate.py` to validate the created PHP module definitions - 5. Run `python3 modules-generate.py` to create Ansible group_vars 2. **Inside the root of this git repository:** - 1. Run `make gen-dockerfiles` to generate Dockerfiles via Ansible - 2. Run `make build STAGE=mods VERSION=8.1 ARCH=linux/amd64` to build the `mods` Docker image with version `8.1` for platform `linux/amd64` + 1. Run `make gen-modules` to create Ansible group_vars + 2. Run `make gen-dockerfiles` to generate Dockerfiles via Ansible + 3. Run `make build STAGE=mods VERSION=8.1 ARCH=linux/amd64` to build the `mods` Docker image with version `8.1` for platform `linux/amd64` **Note:** If you want to test if your new module builds correctly, you can generate Dockerfiles which only contain your module and all others removed. This allows for much faster Docker builds and you don't have to wait for all other modules to be built. To do so you generate group_vars for your module only via: ```bash +# Commands shown here are executed from root of this repository + # Only generate group_vars for curl -# Note: if curl has other modules as requiredments to be built beforehand, those will also be added -python3 module-generate.py curl +# Note: if curl has other modules as requirements to be built beforehand, those will also be added +python3 ./bin/module-generate.py curl +make gen-dockerfiles ``` ## Extension definition: `build.yml` -See **[README-build.yml.md](README-build.yml.md)** how to alter the `build.yml` file. +See **[PHP-EXT-build.yml.md](../doc/PHP-EXT-build.yml.md)** how to alter the `build.yml` file. ## Extension definition: `options.yml` -See **[README-options.yml.md](README-options.yml.md)** how to alter the `options.yml` file. +See **[PHP-EXT-options.yml.md](../doc/PHP-EXT-options.yml.md)** how to alter the `options.yml` file. ## Extension definition: `test.yml` -See **[README-test.yml.md](README-test.yml.md)** how to alter the `test.yml` file. +See **[PHP-EXT-test.yml.md](../doc/PHP-EXT-test.yml.md)** how to alter the `test.yml` file. diff --git a/php_modules/modules-generate.py b/php_modules/modules-generate.py deleted file mode 120000 index a220005..0000000 --- a/php_modules/modules-generate.py +++ /dev/null @@ -1 +0,0 @@ -../bin/modules-generate.py \ No newline at end of file diff --git a/php_modules/modules-validate.py b/php_modules/modules-validate.py deleted file mode 120000 index 1416707..0000000 --- a/php_modules/modules-validate.py +++ /dev/null @@ -1 +0,0 @@ -../bin/modules-validate.py \ No newline at end of file