ci/lava: Avoid eval when generating env script

Remove use of `eval` when writing `dut-job-env-vars.sh`, as it's
unnecessary. The script only needs to declare variables, not evaluate
them.

Using `eval` introduces parsing issues when variables contain both
single and double quotes, such as in commit titles. Example:
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/77995175#L3188
This job failed to parse `CI_COMMIT_TITLE` and `CI_MERGE_REQUEST_TITLE`
correctly due to mixed quoting in:

    Revert "ci: disable Collabora's farm due to maintenance"

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35421>
This commit is contained in:
Guilherme Gallo
2025-06-09 14:47:53 -03:00
parent 655cf2f553
commit e1d54be524
7 changed files with 118 additions and 12 deletions
@@ -89,7 +89,7 @@ actions:
steps:
- |-
echo test FASTBOOT
echo "eval \"$(echo ZWNobyB0ZXN0IEZBU1RCT09U | base64 -d)\"" >> /set-job-env-vars.sh
echo ZWNobyB0ZXN0IEZBU1RCT09U | base64 -d >> /set-job-env-vars.sh
export CURRENT_SECTION=dut_boot
- export -p > /dut-env-vars.sh
- test:
@@ -85,7 +85,7 @@ actions:
run:
steps:
- echo test FASTBOOT
- echo "eval \"$(echo ZWNobyB0ZXN0IEZBU1RCT09U | base64 -d)\"" >> /set-job-env-vars.sh
- echo ZWNobyB0ZXN0IEZBU1RCT09U | base64 -d >> /set-job-env-vars.sh
- export CURRENT_SECTION=dut_boot
- set -e
- echo Could not find jwt file, disabling S3 requests...
@@ -60,7 +60,7 @@ actions:
steps:
- |-
echo test UBOOT
echo "eval \"$(echo ZWNobyB0ZXN0IFVCT09U | base64 -d)\"" >> /set-job-env-vars.sh
echo ZWNobyB0ZXN0IFVCT09U | base64 -d >> /set-job-env-vars.sh
export CURRENT_SECTION=dut_boot
- export -p > /dut-env-vars.sh
- test:
@@ -58,7 +58,7 @@ actions:
run:
steps:
- echo test UBOOT
- echo "eval \"$(echo ZWNobyB0ZXN0IFVCT09U | base64 -d)\"" >> /set-job-env-vars.sh
- echo ZWNobyB0ZXN0IFVCT09U | base64 -d >> /set-job-env-vars.sh
- export CURRENT_SECTION=dut_boot
- set -e
- echo Could not find jwt file, disabling S3 requests...