From 358b2e5128a92d48246d0c174ee68d076929cd92 Mon Sep 17 00:00:00 2001 From: Jakub Stejskal Date: Tue, 22 Oct 2024 19:20:37 +0200 Subject: [PATCH 1/2] Add docs for using --env within manual trigger Signed-off-by: Jakub Stejskal --- docs/configuration/upstream/tests.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/configuration/upstream/tests.md b/docs/configuration/upstream/tests.md index 8c49d6d1e..8b794d99a 100644 --- a/docs/configuration/upstream/tests.md +++ b/docs/configuration/upstream/tests.md @@ -227,6 +227,14 @@ The labels should be in the format of comma-separated string. You can also configure [`test_command.default_labels`](/docs/configuration#default_labels) to allow commonly used job combinations to be triggered without the need for manual specification. +## Running tests with specific environment variables +From time to time, you may need to pass specific environment variables to your jobs. +To achieve this, you can use the `--env` option, which passes environment variables to Testing Farm. +You can set as many environment variables as you want; you just need to pass `--env `for each one. +For example, you can use the following command `/packit test --env MY_ENV=test --env MY_ENV_2=test_2`. +This command allows you to use `MY_ENV` and `MY_ENV_2` in Testing Farm jobs. +You can also unset an environment variable by not setting its value like `/packit test --env MY_ENV=`. + ## Test job statuses By default, while test jobs are waiting for their corresponding build jobs to finish, their statuses share updates with the build jobs, for example `SRPM build is in progress...` From 9302bd6e9e6665822488d6e0531f932e8e497d57 Mon Sep 17 00:00:00 2001 From: Jakub Stejskal Date: Wed, 23 Oct 2024 10:28:11 +0200 Subject: [PATCH 2/2] Comments from Laura Signed-off-by: Jakub Stejskal --- docs/configuration/upstream/tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration/upstream/tests.md b/docs/configuration/upstream/tests.md index 8b794d99a..afc385ca6 100644 --- a/docs/configuration/upstream/tests.md +++ b/docs/configuration/upstream/tests.md @@ -229,7 +229,7 @@ to be triggered without the need for manual specification. ## Running tests with specific environment variables From time to time, you may need to pass specific environment variables to your jobs. -To achieve this, you can use the `--env` option, which passes environment variables to Testing Farm. +To achieve this, you can use the `--env` option in the comment command `/packit test`, which passes environment variables to Testing Farm. You can set as many environment variables as you want; you just need to pass `--env `for each one. For example, you can use the following command `/packit test --env MY_ENV=test --env MY_ENV_2=test_2`. This command allows you to use `MY_ENV` and `MY_ENV_2` in Testing Farm jobs.