[WIP] Expand variables with values in CI config
What does this MR do?
Adds the ability to define more complex variables by means of variable composites.
this-job-name-123:
except:
variables:
- $CI_COMMIT_MESSAGE =~ /Skip $CI_JOB_NAME/i
- $STRING_VAR = Current job name is ${CI_JOB_NAME}
script:
- echo The job runs unless the commit message contains "Skip this-job-name-123"
Are there points in the code the reviewer needs to double check?
- Replication of code between the
Pattern
andString
Lexeme
- What is the desired behavior in case of a referenced variable not being defined (Current behavior is that the variable reference is removed from the original
regexp
orstring
)
Why was this MR needed?
- More flexibility should be added for the definitions of variables in CI jobs.
- This change was requested in #49534 (moved)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Conforms to the code review guidelines
-
Has been reviewed by a Backend maintainer
-
-
Conforms to the merge request performance guidelines -
Conforms to the style guides -
If you have multiple commits, please combine them into a few logically organized commits by squashing them -
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Edited by Ivan Bakalov