Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information:

Commit f51cf570 authored by Artur Grunau's avatar Artur Grunau
Browse files

Make the regex used to detect pipelines more permissive

Automatic pipeline registration would fail for certain valid ways of
declaring a pipeline:
- if the base pipeline class was qualified with a namespace
- if the pipeline inherited from additional classes
- if the declaration followed coding conventions different than CAMPVis'
  (e.g. no space before :, { on a new line)

Make the regex used to detect pipelines more permissive to handle the
above cases.

Closes #233
parent 0c73f0f7
FILE(READ ${FileName} content)
# Build a regex matching pipeline declarations and extracting their names
SET(NameRegex "[A-Za-z0-9_]+")
SET(FullyQualifiedNameRegex "(::)?(${NameRegex}::)*${NameRegex}")
SET(BaseClassListRegex "((public|private|protected)( virtual)? ${FullyQualifiedNameRegex}, )*")
SET(ClassRegex "class (${NameRegex}) ?: ${BaseClassListRegex}public ${FullyQualifiedNameRegex}Pipeline")
# Find all class definitions inheriting from a Pipeline
STRING(REGEX MATCHALL "class ([A-Za-z0-9_]+) : public [A-Za-z0-9_]+Pipeline {" matches ${content})
STRING(REGEX MATCHALL ${ClassRegex} matches ${content})
FOREACH(m ${matches})
# Extract class name and register
STRING(REGEX REPLACE "(class )([A-Za-z0-9_]+)( : public [A-Za-z0-9_]+Pipeline {)" "\\2" RESULT ${m})
STRING(REGEX REPLACE ${ClassRegex} "\\1" RESULT ${m})
......@@ -214,4 +220,4 @@ MACRO(DEFINE_SOURCE_GROUPS_FROM_SUBDIR Files BasePath RemovePathPrefixes)
# MESSAGE(STATUS "${f} -> ${f_cat}")
\ No newline at end of file
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