Fix web content copying in multi dashboard job

The existing code results in:

  cp: omitting directory 'src/git.openstack.org/openstack-infra/zuul/zuul/web/static/t'

because it's picking up the t subdir when trying to copy everything.
Update it to be more smarter about which things to copy.

Also, add a shell variable to make the shell snipped easier to read.

Change-Id: Ib61110cfa10e137c3d780e8529e64655b64c3cce
This commit is contained in:
Monty Taylor 2018-08-10 16:15:49 -05:00
parent 4895b9b40f
commit 85c70e1fab
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
1 changed files with 5 additions and 2 deletions

View File

@ -8,8 +8,11 @@
- name: Copy the html/javascript content into subdirs
shell: |
mkdir {{ zuul.project.src_dir }}/{{ javascript_content_dir }}/t/{{ item }}
cp {{ zuul.project.src_dir }}/{{ javascript_content_dir }}/* {{ zuul.project.src_dir }}/{{ javascript_content_dir }}/t/{{ item }}
CONTENT_DIR="{{ zuul.project.src_dir }}/{{ javascript_content_dir }}"
mkdir $CONTENT_DIR/t/{{ item }}
for f in $(find $CONTENT_DIR -type f -mindepth 1 -maxdepth 1) ; do
cp $f $CONTENT_DIR/t/{{ item }}
done
with_items:
- local
- ansible