[15.10 Backport] Perform build environment printing in a different block
What does this MR do and why?
Backport of !119945 (merged)
As seen from https://gitlab.com/gitlab-org/gitlab/-/jobs/4242121728#L61, the echo
used for user message might be flowing to the env file and cause issues with TRIGGER_BRANCH
being jibberish. Let's separate the file generation and printing into two different blocks.
Also, make the env file available as an artifact for debugging.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
This MR is backporting a bug fix, documentation update, or spec fix, previously merged in the default branch. -
The original MR has been deployed to GitLab.com (not applicable for documentation or spec changes). -
This MR has a severity label assigned (if applicable). -
This MR has been approved by a maintainer (only one approval is required). -
Ensure the e2e:package-and-test-ee
job has either succeeded or been approved by a Software Engineer in Test.
Note to the merge request author and maintainer
The process of backporting bug fixes into stable branches is tracked as part of an internal pilot. If you have questions about this process, please:
- Refer to the internal pilot issue for feedback or questions.
- Refer to the patch release runbook for engineers and maintainers for guidance.
Edited by Balasankar 'Balu' C