Commit fc56a179 authored by Mitar's avatar Mitar

Correctly detect main repository.

parent 2d6ef42d
......@@ -35,6 +35,7 @@ PRIMITIVE_ANNOTATION_REGEX = re.compile(r'^(?P<interface_version>v[^/]+)/(?P<per
PIPELINE_REGEX = re.compile(r'^(?P<interface_version>v[^/]+)/(?P<performer_team>[^/]+)/(?P<python_path>[^/]+)/(?P<version>[^/]+)/pipelines/[^/.]+(\.yml|\.json|\.meta)$')
FIX_EGG_VALUE_REGEX = re.compile(r'Fix your #egg=\S+ fragments')
MAIN_REPOSITORY = 'https://gitlab.com/datadrivendiscovery/primitives.git'
MAIN_PROJECT = 'https://gitlab.com/datadrivendiscovery/primitives'
FIXED_PACKAGE_VERSIONS = {
'v2018.4.18': {
......@@ -824,14 +825,14 @@ def validate_installation(primitive_names, interface_version, installation, anno
main_repository = private_git_uri_access(MAIN_REPOSITORY)
master_branch_main_repository = os.environ.get('GITLAB_CI', False) and os.environ['CI_COMMIT_REF_NAME'] == 'master' and os.environ['CI_REPOSITORY_URL'] == main_repository
master_branch_main_project = os.environ.get('GITLAB_CI', False) and os.environ['CI_COMMIT_REF_NAME'] == 'master' and os.environ['CI_PROJECT_URL'] == MAIN_PROJECT
if arguments.devel:
print(">>> Validating against devel version.", flush=True)
# If argument is set, we validate all annotations in the repo.
# We also validate all annotations when running on the master branch of the main repository.
if arguments.all or master_branch_main_repository:
# We also validate all annotations when running on the master branch of the main project.
if arguments.all or master_branch_main_project:
print(">>> Validating all annotations.", flush=True)
prefix = os.path.join('.', 'v')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment