Skip to content
Snippets Groups Projects

Feat gl cicd var scripts

Merged Eesaan Atluri requested to merge atlurie/hpc-factory:feat-gl-cicd-var-scripts into main
1 file
+ 14
0
Compare changes
  • Side-by-side
  • Inline
@@ -18,6 +18,20 @@ def create_or_update_variable(project, var_dict):
@@ -18,6 +18,20 @@ def create_or_update_variable(project, var_dict):
key = var_dict.get("key")
key = var_dict.get("key")
scope = var_dict.get("environment_scope", "*")
scope = var_dict.get("environment_scope", "*")
p_variable = None
p_variable = None
 
 
DEFAULTS = {
 
"variable_type": "env_var",
 
"hidden": False,
 
"protected": False,
 
"masked": False,
 
"environment_scope": "*",
 
"raw": False,
 
"description": None,
 
}
 
 
# Merge defaults with var_dict
 
var_dict = {**DEFAULTS, **var_dict}
 
# Fetch a variable with matching key and scope
# Fetch a variable with matching key and scope
try:
try:
all_vars = project.variables.list(get_all=True)
all_vars = project.variables.list(get_all=True)
Loading