Add the cws-upload and fetch-cws-upload-log roles

Modified versions of these roles were previously hosted in the
infinitegforums project, but these will also be used in the
translateselectedtext project, and thus from now on they will be hosted
here so they can be shared between the two.

In fact, these roles have been modified and documentation has been added
so they can be used by other Zuul users in their own projects.

Change-Id: Ic6f9692d3a087b80bd8ac5bfa8fbb5043bea6f4b
diff --git a/roles/fetch-cws-upload-log/README.md b/roles/fetch-cws-upload-log/README.md
new file mode 100644
index 0000000..fb57730
--- /dev/null
+++ b/roles/fetch-cws-upload-log/README.md
@@ -0,0 +1,2 @@
+Fetch the logs generated by the `cws-upload` role and store them in the
+executor.
diff --git a/roles/fetch-cws-upload-log/tasks/main.yaml b/roles/fetch-cws-upload-log/tasks/main.yaml
new file mode 100644
index 0000000..9500f96
--- /dev/null
+++ b/roles/fetch-cws-upload-log/tasks/main.yaml
@@ -0,0 +1,14 @@
+- name: Is there a cws-log.txt
+  register: stat_log
+  stat:
+    path: "{{ workingDirectory }}/cws-log.txt"
+
+- name: Store on executor
+  when: stat_log.stat.exists
+  synchronize:
+    mode: pull
+    src: "{{ workingDirectory }}/cws-log.txt"
+    dest: "{{ zuul.executor.log_root }}/cws-log.txt"
+    verify_host: true
+    owner: no
+    group: no