From 85c70e1fab0102fbdaa38de55eb14e83cc46f877 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 10 Aug 2018 16:15:49 -0500 Subject: [PATCH] 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 --- playbooks/dashboard/multi.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/playbooks/dashboard/multi.yaml b/playbooks/dashboard/multi.yaml index 0b8ce82933..49f8602c61 100644 --- a/playbooks/dashboard/multi.yaml +++ b/playbooks/dashboard/multi.yaml @@ -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