-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support GitLab references #24
Conversation
The sequence just denotes a path to an item in the object model (like xpath for yaml).
1st item is the job label or one of the special labels 2nd item represents a job-keyword, like 3rd item may be variable, but can probably also be something like an artefact definition (see: https://docs.gitlab.com/ee/ci/yaml/index.html#artifactspaths) job1:
artifacts:
paths:
- binaries/
- .config
job2:
artefacts:
paths: !reference ["job1", "artefacts", "paths"] Therefore maybe just treat it as a list of constants without interpreting kind of item - at least on of item 3. |
I also wouldn't put too much thought into the scope names of the reference segments since they are just … references to any other block in the pipeline and may use arbitrary names. |
fa08f52
to
b034f70
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still not clear on the scope names (especially how there are three different scopes for the first three elements and then it's back to the first?), but let's roll with it for now and see how it fares in practice.
Edit: I guess a quick improvement would be to allow the third kind to match an arbitrary amount of times instead of just once and then poping.
fixes #18
not sure about scopes though - I consider the first sequence item to be a reference to a label, like a
goto
in programming languages. The second item is like the type of reference, and the third a specific identifier to reference.