From ba11ba659baf3f47d34c698d6272145428594010 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Tue, 30 May 2023 09:31:01 +0200 Subject: [PATCH] fixup! When trying to use this tool on anything other than Travis it is harder to make ci script look lean because so many options have to be crammed in the install command line. --- docs/CHANGELOG.md | 12 ++++++++++++ docs/GHAFileExplained.md | 6 +++++- docs/TravisFileExplained.md | 4 +++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 965708da..adfb5e9e 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -8,6 +8,18 @@ This project adheres to [Semantic Versioning](http://semver.org/). The format of this change log follows the advice given at [Keep a CHANGELOG](http://keepachangelog.com). +## [Unreleased] +### Added +- Add support for the following optional env variables, that will be used on installation, getting precedence over the corresponding existing option: + - `DB_USER`: To specify the database username (alternative to `--db-user`) + - `DB_PASS`: To specify the database password (alternative to `--db-pass`) + - `DB_NAME`: To specify the database name (alternative to `--db-name`) + - `DB_HOST`: To specify the database host (alternative to `--db-host`) + - `DB_PORT`: To specify the database port (alternative to `--db-port`) + + Note that these new env variables behave exactly the same than the existing (and often used) `DB` one, that is also a priority alternative to `--db-type` on install. + + ## [4.1.0] - 2023-05-29 ### Added - Add the `--testdox` option to the `phpunit` command. diff --git a/docs/GHAFileExplained.md b/docs/GHAFileExplained.md index 2df43b0b..ce8c3074 100644 --- a/docs/GHAFileExplained.md +++ b/docs/GHAFileExplained.md @@ -120,6 +120,10 @@ jobs: # MUSTACHE_IGNORE_NAMES: 'broken.mustache' # CODECHECKER_IGNORE_PATHS: 'ignoreme' # CODECHECKER_IGNORE_NAMES: 'ignoreme_name.php' + # + # Other env vars are available for install, namely: + # - DB_USER / DB_PASS / DB_NAME / DB_HOST / DB_PORT: used + # by install to feed the corresponding --db-xxxx options. - name: Install moodle-plugin-ci run: | moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1 @@ -176,4 +180,4 @@ jobs: if: ${{ always() }} run: moodle-plugin-ci behat --profile chrome ``` - \ No newline at end of file + diff --git a/docs/TravisFileExplained.md b/docs/TravisFileExplained.md index 3930b194..0c8db5f1 100644 --- a/docs/TravisFileExplained.md +++ b/docs/TravisFileExplained.md @@ -55,7 +55,9 @@ env: # each version of PHP being tested, one build will be created for each # database listed here. EG: for PHP 7.4, one build will be created # using PHP 7.4 and pgsql. In addition, another build will be created -# using PHP 7.4 and mysqli. +# using PHP 7.4 and mysqli. Also, note that DB_USER / DB_PASS / DB_NAME +# / DB_HOST / DB_PORT env vars can be used by install to feed the +# corresponding --db-xxxx options. matrix: - DB=pgsql - DB=mysqli