Format publish_site in docs promotion

The publish_site var which is used in the format string for
target_dir in docs promotion jobs sometimes itself relies on
variable substitution to embed the triggering project details from
the zuul variable tree. Nest an additional .format() call for it to
make sure this is expanded as intended when evaluated.

Change-Id: I96eb5f48b762b55a27c9faab59793031b275b453
This commit is contained in:
Roman Gorshunov 2021-06-30 17:09:36 +02:00 committed by Jeremy Stanley
parent cec06d2e03
commit 2c96eae80d

View File

@ -54,7 +54,7 @@
target_dict: "{{ afs.targets.branch }}"
- name: Set target path
set_fact:
target_dir: "{{ target_dict.path.format(zuul=zuul, publish_site=publish_site, special_publish_directory=special_publish_directory) }}"
target_dir: "{{ target_dict.path.format(zuul=zuul, publish_site=publish_site.format(zuul=zuul), special_publish_directory=special_publish_directory) }}"
- name: Adjust target path
when: "target_dict.regex is defined"
set_fact: