Loading .gitlab-ci.yml +1 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ Build Images: trigger: include: - project: dom/project-templates ref: f7997d0d file: /pipeline-templates/build-image.yml strategy: depend Loading .pre-commit-config.yaml +2 −1 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ repos: - id: check-for-squash - id: copyright-notice exclude: ^data/|^scripts/(compile-|install-) args: [--min-size=1000] - id: protect-first-parent - repo: https://github.com/pre-commit/pygrep-hooks Loading Loading @@ -93,4 +94,4 @@ repos: args: ["--python-version=3.9"] additional_dependencies: - types-requests - behave-utils ~=0.3.2 - behave-utils ~=0.4.1 doc/configuration.md +16 −6 Original line number Diff line number Diff line Loading @@ -39,10 +39,14 @@ to the container, however: - Unlike the way most configuration systems treat environment variables, they do not overwrite options provided in the configuration files unless the files are specifically written to honour the environment variables. the files are specifically written to honour the environment variables, for instance by using the "+=" operator to append to arrays. - For array options the value provided in the environment variable will become the first item (index 0). - For array options the value provided will be split on whitespace. Unfortunately at the moment there is no way to escape or quote whitespace within items. If you find yourself needing to add items with whitespace, consider using configuration files instead, which are interpreted with Bash, or one of the [convenience files](#convenience-files). Convenience Files Loading @@ -55,6 +59,10 @@ options are optional plain text files listing additional entries (one per line) to append to the [**PLUGINS**](#plugins), [**THEMES**](#themes) and [**LANGUAGES**](#languages) option arrays respectively. > **Note:** Every line in these files MUST be correctly terminated in the Unix > style (with a line-feed character). Please pay special attention to the final > line as some text editors do not correctly terminate them. Options ------- Loading Loading @@ -147,7 +155,7 @@ the missing language pack will be silently ignored. **Required**: no\ **Default**: /etc/wordpress/languages.txt The path to a file containing lines to append to The path to a plain text file containing lines to append to [**LANGUAGES**](#languages). ### PLUGINS Loading @@ -165,7 +173,8 @@ be the latest stable available in the wordpress.org registry. **Required**: no\ **Default**: /etc/wordpress/plugins.txt The path to a file containing lines to append to [**PLUGINS**](#plugins). The path to a plain text file containing lines to append to [**PLUGINS**](#plugins). ### PHP_DIRECTIVES Loading Loading @@ -307,7 +316,8 @@ latest stable available in the wordpress.org registry. **Required**: no\ **Default**: /etc/wordpress/themes.txt The path to a file containing lines to append to [**THEMES**](#themes). The path to a plain text file containing lines to append to [**THEMES**](#themes). ### WP_CONFIGS Loading scripts/entrypoint.sh +15 −3 Original line number Diff line number Diff line Loading @@ -305,6 +305,18 @@ run_background_cron() exec -a wp-cron /bin/bash <<<run_cron )& } readlines() { declare -n ARRAY=$1 while IFS=$'\r\n' read line; do ARRAY+=( "$line" ) done if [[ "$line" ]]; then echo >&2 "WARNING: unterminated line in" `readlink /proc/self/fd/0` ARRAY+=( "$line" ) fi } mkdir -p ${CONFIG_DIR} cd ${CONFIG_DIR} Loading @@ -313,13 +325,13 @@ for file in **/*.conf; do done if [[ -e ${PLUGINS_LIST:=${CONFIG_DIR}/plugins.txt} ]]; then PLUGINS+=( $(<"${PLUGINS_LIST}") ) readlines PLUGINS <"${PLUGINS_LIST}" fi if [[ -e ${THEMES_LIST:=${CONFIG_DIR}/themes.txt} ]]; then THEMES+=( $(<"${THEMES_LIST}") ) readlines THEMES <"${THEMES_LIST}" fi if [[ -e ${LANGUAGES_LIST:=${CONFIG_DIR}/languages.txt} ]]; then LANGUAGES+=( $(<"${LANGUAGES_LIST}") ) readlines LANGUAGES <"${LANGUAGES_LIST}" fi declare -a extra_args Loading tests/configs/bad-plugins.txt 0 → 100644 +1 −0 Original line number Diff line number Diff line this-plugin-does-not-exist Loading
.gitlab-ci.yml +1 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ Build Images: trigger: include: - project: dom/project-templates ref: f7997d0d file: /pipeline-templates/build-image.yml strategy: depend Loading
.pre-commit-config.yaml +2 −1 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ repos: - id: check-for-squash - id: copyright-notice exclude: ^data/|^scripts/(compile-|install-) args: [--min-size=1000] - id: protect-first-parent - repo: https://github.com/pre-commit/pygrep-hooks Loading Loading @@ -93,4 +94,4 @@ repos: args: ["--python-version=3.9"] additional_dependencies: - types-requests - behave-utils ~=0.3.2 - behave-utils ~=0.4.1
doc/configuration.md +16 −6 Original line number Diff line number Diff line Loading @@ -39,10 +39,14 @@ to the container, however: - Unlike the way most configuration systems treat environment variables, they do not overwrite options provided in the configuration files unless the files are specifically written to honour the environment variables. the files are specifically written to honour the environment variables, for instance by using the "+=" operator to append to arrays. - For array options the value provided in the environment variable will become the first item (index 0). - For array options the value provided will be split on whitespace. Unfortunately at the moment there is no way to escape or quote whitespace within items. If you find yourself needing to add items with whitespace, consider using configuration files instead, which are interpreted with Bash, or one of the [convenience files](#convenience-files). Convenience Files Loading @@ -55,6 +59,10 @@ options are optional plain text files listing additional entries (one per line) to append to the [**PLUGINS**](#plugins), [**THEMES**](#themes) and [**LANGUAGES**](#languages) option arrays respectively. > **Note:** Every line in these files MUST be correctly terminated in the Unix > style (with a line-feed character). Please pay special attention to the final > line as some text editors do not correctly terminate them. Options ------- Loading Loading @@ -147,7 +155,7 @@ the missing language pack will be silently ignored. **Required**: no\ **Default**: /etc/wordpress/languages.txt The path to a file containing lines to append to The path to a plain text file containing lines to append to [**LANGUAGES**](#languages). ### PLUGINS Loading @@ -165,7 +173,8 @@ be the latest stable available in the wordpress.org registry. **Required**: no\ **Default**: /etc/wordpress/plugins.txt The path to a file containing lines to append to [**PLUGINS**](#plugins). The path to a plain text file containing lines to append to [**PLUGINS**](#plugins). ### PHP_DIRECTIVES Loading Loading @@ -307,7 +316,8 @@ latest stable available in the wordpress.org registry. **Required**: no\ **Default**: /etc/wordpress/themes.txt The path to a file containing lines to append to [**THEMES**](#themes). The path to a plain text file containing lines to append to [**THEMES**](#themes). ### WP_CONFIGS Loading
scripts/entrypoint.sh +15 −3 Original line number Diff line number Diff line Loading @@ -305,6 +305,18 @@ run_background_cron() exec -a wp-cron /bin/bash <<<run_cron )& } readlines() { declare -n ARRAY=$1 while IFS=$'\r\n' read line; do ARRAY+=( "$line" ) done if [[ "$line" ]]; then echo >&2 "WARNING: unterminated line in" `readlink /proc/self/fd/0` ARRAY+=( "$line" ) fi } mkdir -p ${CONFIG_DIR} cd ${CONFIG_DIR} Loading @@ -313,13 +325,13 @@ for file in **/*.conf; do done if [[ -e ${PLUGINS_LIST:=${CONFIG_DIR}/plugins.txt} ]]; then PLUGINS+=( $(<"${PLUGINS_LIST}") ) readlines PLUGINS <"${PLUGINS_LIST}" fi if [[ -e ${THEMES_LIST:=${CONFIG_DIR}/themes.txt} ]]; then THEMES+=( $(<"${THEMES_LIST}") ) readlines THEMES <"${THEMES_LIST}" fi if [[ -e ${LANGUAGES_LIST:=${CONFIG_DIR}/languages.txt} ]]; then LANGUAGES+=( $(<"${LANGUAGES_LIST}") ) readlines LANGUAGES <"${LANGUAGES_LIST}" fi declare -a extra_args Loading
tests/configs/bad-plugins.txt 0 → 100644 +1 −0 Original line number Diff line number Diff line this-plugin-does-not-exist