Skip to content
Snippets Groups Projects
Commit 1aa51f58 authored by Tim Jaacks's avatar Tim Jaacks
Browse files

deploy_gitlab_ci: exit successfully if submodule already up to date

parent 9a496cdb
No related branches found
No related tags found
1 merge request!90deploy_gitlab_ci: exit successfully if submodule already up to date
Pipeline #8755 passed with stages
in 3 minutes and 16 seconds
...@@ -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(
......
...@@ -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(".."):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment