gsc
gsc copied to clipboard
Implement namespace separation for all GSC sub-commands gsc build, build-gramine and sign-image.
In the current implementation in gsc.py
, we add all CLI arguments into the environment, which may create conflicting names(variables passed from command line and internal variables used in script). Based on the discussion in PR #144 below solution need to applied across gsc.py
.
- add explicit
'--define', '-D'
option similar to what we have ingramine-manifest
that would acceptkey=value
pairs which are added to globals (and only those); then if you prefer, add e.g.--remove-gramine-deps
as an alias for-Dremove_gramine_deps=true
; - add whole namespace as a single object (
env.globals['args'] = args
) and use those as{% if args.flag %}
. Because that's namespace, there will be a less risk of a collision.
Expected results
All gsc subcommands and options should work as it is.