Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpc-factory
Manage
Activity
Members
Labels
Plan
Issues
68
Issue boards
Milestones
Wiki
Code
Merge requests
11
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rc
hpc-factory
Merge requests
!196
Feat gl cicd var scripts
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Feat gl cicd var scripts
atlurie/hpc-factory:feat-gl-cicd-var-scripts
into
main
Overview
0
Commits
18
Pipelines
0
Changes
5
Merged
Eesaan Atluri
requested to merge
atlurie/hpc-factory:feat-gl-cicd-var-scripts
into
main
1 month ago
Overview
0
Commits
18
Pipelines
0
Changes
1
Expand
Closes
#232 (closed)
Edited
1 month ago
by
Eesaan Atluri
👍
1
👎
0
Merge request reports
Viewing commit
cb6e01a9
Show latest version
1 file
+
5
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
cb6e01a9
Catch exception raised when variable is not found
· cb6e01a9
Eesaan Atluri
authored
1 month ago
scripts/gitlab-ci-vars-updater.py
+
5
−
1
Options
@@ -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