Open falkheiland opened 2 years ago
Parameters in the tasks that uses property
uses the value passed to the parameter, or uses the value on the environment variable that matches, or uses the value in a variable in the parent scope. Can you explain how the change would benefit your pipeline process if neither of the previous can be used.
i would not need to set environment variables and use the existing config file for a config.
Yeah, agreed it should be readable from the build.yaml. Not being able to do so is just an oversight.
using the InvokeBuild property
feature to read from environment variable is not a competing feature, just another way of achieving this feature.
Also, to @johlju's point, one of the problem is that for the property
to be settable by parameter to build.ps1, the parameter should exist in build.ps1, which I can't recommend (best to keep it generic to all Sampler projects).
I'm guessing you both mean that the build.ps1
would read variables from the config (Vars:
or BuildVariables:
for clarity). Then build.ps1
set them as environment variables unless there already exist an environment variable with that name, and it wasn't passed as a parameter to build.ps1. 🤔
Labeling it as an enhancement, happy to review a PR for this.
Problem description
suggestion to create an alternative to the use envrionment variables such as $Env:HelpSourceFolder inside the Config if not set via param input, and using a default as last resort.
Verbose logs
How to reproduce
n.a.
Expected behavior
n.a.
Current behavior
n.a.
Suggested solution
have Vars section in the build.yaml as alternative to env vars
e.g.
Operating system the target node is running
PowerShell version and build the target node is running
Module version used