Skip to content

Comments

Add environment variables to evaluation scope#341

Merged
Nusiq merged 3 commits intoBedrock-OSS:developfrom
Fabrimat:env-vars-in-evaluator
Dec 3, 2025
Merged

Add environment variables to evaluation scope#341
Nusiq merged 3 commits intoBedrock-OSS:developfrom
Fabrimat:env-vars-in-evaluator

Conversation

@Fabrimat
Copy link
Contributor

This pull request updates the regolith/evaluator.go file to enhance the evaluation context by including all environment variables. The main change is the addition of a new env field to the scope, which provides access to all environment variables as a map. This will allow scripts and evaluations to reference environment variables directly.

Enhancement to evaluation scope:

  • Imported the os and strings packages to enable reading and parsing environment variables.
  • Added logic to collect all environment variables into a map called envVars, mapping each variable name to its value.
  • Included the new env field in the scope returned by prepareScope, making environment variables available for evaluation.

Nusiq and others added 2 commits November 10, 2025 12:04
The prepareScope function now includes all environment variables in the returned scope under the 'env' key. This allows scripts and evaluations to access environment variables during execution.
@Nusiq Nusiq changed the base branch from main to develop November 20, 2025 16:03
@Nusiq Nusiq merged commit 8e7194d into Bedrock-OSS:develop Dec 3, 2025
@Nusiq Nusiq mentioned this pull request Dec 3, 2025
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants