mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
build_manifest: Never use users 'master' branch for repos we are not explicitely building
People very often do not update them leading to random and weird failures
This commit is contained in:
parent
d8ebbea1f0
commit
10ae6d0326
1 changed files with 14 additions and 13 deletions
|
@ -190,20 +190,21 @@ def find_repository_sha(module: Tuple[str, int], branchname: str) -> Tuple[str,
|
||||||
if module[0] == os.environ['CI_PROJECT_NAME']:
|
if module[0] == os.environ['CI_PROJECT_NAME']:
|
||||||
return 'user', os.environ['CI_COMMIT_SHA']
|
return 'user', os.environ['CI_COMMIT_SHA']
|
||||||
|
|
||||||
project = search_user_namespace(namespace, module[0])
|
if branchname != "master":
|
||||||
# Find a fork in the User's namespace
|
project = search_user_namespace(namespace, module[0])
|
||||||
if project:
|
# Find a fork in the User's namespace
|
||||||
id = project['id']
|
if project:
|
||||||
print(f"User project found, id: {id}")
|
id = project['id']
|
||||||
# If we have a branch with same name, use it.
|
print(f"User project found, id: {id}")
|
||||||
branch = get_project_branch(id, branchname)
|
# If we have a branch with same name, use it.
|
||||||
if branch is not None:
|
branch = get_project_branch(id, branchname)
|
||||||
path = project['namespace']['path']
|
if branch is not None:
|
||||||
print("Found mathcing branch in user's namespace")
|
path = project['namespace']['path']
|
||||||
print(f"{path}/{branchname}")
|
print("Found matching branch in user's namespace")
|
||||||
|
print(f"{path}/{branchname}")
|
||||||
|
|
||||||
return 'user', branch['commit']['id']
|
return 'user', branch['commit']['id']
|
||||||
print(f"Did not found user branch named {branchname}")
|
print(f"Did not find user branch named {branchname}")
|
||||||
|
|
||||||
# Check upstream project for a branch
|
# Check upstream project for a branch
|
||||||
branch = get_project_branch(module[1], branchname)
|
branch = get_project_branch(module[1], branchname)
|
||||||
|
|
Loading…
Reference in a new issue