From 8abfbca7c3bc22370ee20a987af3bf22da37b72d Mon Sep 17 00:00:00 2001 From: Andrii Sosiuk <andrii.sosiuk@seco.com> Date: Tue, 18 Jun 2024 16:56:27 +0200 Subject: [PATCH] YT-176 Skip projects with no permissions If a project have no permissions, it probably won't be processed in seco-ne CI pipelines. Exclude venv directory from version control --- .gitignore | 1 + scripts/get_integration_sources.py | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 418ff824..c5301466 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ scripts/__pycache__ scripts/fng* scripts/yocto* +venv* diff --git a/scripts/get_integration_sources.py b/scripts/get_integration_sources.py index 94ded908..ee1dd20d 100755 --- a/scripts/get_integration_sources.py +++ b/scripts/get_integration_sources.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 import argparse import re -import sys from gitlab import Gitlab, GitlabGetError from gitlab.v4.objects import Group @@ -48,10 +47,8 @@ def get_integration_sources(manifest_project: str, manifest_branch: str, group: if e.response_code == 404: # not found pass elif e.response_code == 403: # forbidden - sys.exit( - f"ERROR: could not get INTEGRATION variable of project " - f"{project.path_with_namespace}\n" - f"{e.error_message}" + print( + f"Warning: No permissions to the shared project {project.path_with_namespace}. Skipping it." ) else: raise -- GitLab