Sunday, 2025-02-23

-@gerrit:opendev.org- Zuul merged on behalf of Simon Westphahl: [zuul/zuul] 942059: Make connection event iteration more efficient https://review.opendev.org/c/zuul/zuul/+/94205908:43
@skachano.de:matrix.orghi everyone, can you advise me on the following:11:42
in a playbook (included in, say, run section), i want to include other playbooks, but i would like to address them in an absolute way to avoid including them with a lot of ../.. and so on.
this is apparently not possible since absolute paths are resolved against filesystem root, so i am trying to use some common prefix, which i first have to compute:
1) it would be nice to have something on a job level but i am failing to find anything like this
2) if i am trying to compute it using {{ playbook_dir }} - i am only able to do this in a playbook (i.e. this is not defined on a job level so specifying a job variable like "root: '{{ playbook_dir }}'" with all needed "../.." will only work if i do this in a playbook in pre-run and compute this fact based on a path of this pre-run playbook which feels like a hack)
3) when i am checking this playbook_dir, i see that has a form "/var/lib/zuul/builds/<build id>/work/src/<repo name>/<playbook path>". so using this one directly requires stripping the playbook folder component off. at the same time, i seem to be able to construct path to the playbook as "{{ zuul.executor.work_root }}/{{ zuul.project.src_dir }}/<playbook folder>". are these equivalent, and is it safe to use the one "{{ zuul.executor.work_root }}/{{ zuul.project.src_dir }}"

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!