Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gitlab-ci
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
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
SECO Northern Europe
Yocto
infrastructure
gitlab-ci
Commits
1aa51f58
Commit
1aa51f58
authored
3 years ago
by
Tim Jaacks
Browse files
Options
Downloads
Patches
Plain Diff
deploy_gitlab_ci: exit successfully if submodule already up to date
parent
9a496cdb
No related branches found
No related tags found
1 merge request
!90
deploy_gitlab_ci: exit successfully if submodule already up to date
Pipeline
#8755
passed with stages
Stage:
Stage:
in 3 minutes and 16 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
deploy_gitlab_ci.py
+3
-0
3 additions, 0 deletions
deploy_gitlab_ci.py
update_submodule.py
+1
-1
1 addition, 1 deletion
update_submodule.py
with
4 additions
and
1 deletion
deploy_gitlab_ci.py
+
3
−
0
View file @
1aa51f58
...
@@ -67,6 +67,9 @@ def main():
...
@@ -67,6 +67,9 @@ def main():
integration_branch
,
_
,
submodule_project
=
update_submodule
(
integration_branch
,
_
,
submodule_project
=
update_submodule
(
project
,
args
.
submodule
,
args
.
revision
,
args
.
branch
project
,
args
.
submodule
,
args
.
revision
,
args
.
branch
)
)
# If submodule is already at specified revision, exit successfully
if
not
integration_branch
:
sys
.
exit
(
0
)
# Get source merge request
# Get source merge request
mrs
=
get_merge_requests
(
mrs
=
get_merge_requests
(
...
...
This diff is collapsed.
Click to expand it.
update_submodule.py
+
1
−
1
View file @
1aa51f58
...
@@ -40,7 +40,7 @@ def update_submodule(project, submodule_name, submodule_revision, branch=None):
...
@@ -40,7 +40,7 @@ def update_submodule(project, submodule_name, submodule_revision, branch=None):
# Check if revisions are different
# Check if revisions are different
if
submodule
.
hexsha
==
submodule_revision
:
if
submodule
.
hexsha
==
submodule_revision
:
print
(
"
Submodule is already at %s
"
%
submodule_revision
)
print
(
"
Submodule is already at %s
"
%
submodule_revision
)
return
0
return
(
None
,
None
,
None
)
# Check for relative path
# Check for relative path
if
not
submodule
.
url
.
startswith
(
"
..
"
):
if
not
submodule
.
url
.
startswith
(
"
..
"
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment