Add a job variable to control javascript link copying

The zuul multi-tenant dashboard job wants to make a few symlinks to
simulate what would happen on a real deployment with rewrite rules. The
current hard-coded behavior of copying the links causes ... havoc.

Add a job variable defaulting to the current behavior which such jobs
can flip if they need to.

Change-Id: I751524baa80353606d74b87dbaacfe7cd8b71a5e
This commit is contained in:
Monty Taylor 2018-06-05 15:10:08 -05:00
parent b457191d14
commit ce9a90ff8f
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
3 changed files with 8 additions and 1 deletions

View File

@ -12,3 +12,9 @@ Collect outputs from a javascript build
Directory, relative to zuul_work_dir, in which javascript output content
is to be found.
.. zuul:rolevar:: javascript_copy_links
:default: true
Whether to copy the data pointed to by symlinks in the built content, or
to copy them as symbolic links.

View File

@ -1,2 +1,3 @@
zuul_work_dir: "{{ zuul.project.src_dir }}"
javascript_content_dir: dist
javascript_copy_links: true

View File

@ -115,6 +115,6 @@
src: "{{ zuul_work_dir }}/{{ javascript_content_dir }}/"
dest: "{{ log_path }}/html/"
mode: pull
copy_links: true
copy_links: "{{ javascript_copy_links }}"
verify_host: true
when: javascript_output.stat.exists