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
+ 5
1
Compare changes
  • Side-by-side
  • Inline
@@ -16,7 +16,11 @@ def load_file(file_path):
# Function to create or update a GitLab CI/CD variable
def create_or_update_variable(project, var_dict):
# Check if the variable exists in the project
p_variable = project.variables.get(var_dict["key"]).asdict()
try:
p_variable = project.variables.get(var_dict["key"]).asdict()
except gitlab.exceptions.GitlabGetError:
print("Variable not found")
p_variable = False
if p_variable:
if p_variable != var_dict:
# Check if the attributes are the same
Loading