Add content to support translation jobs

We need a role to fetch translation output to the executor for artifact
upload.

We also need to be able to specify a leading path when uploading
artifacts as translations go into a top dir of translation-source.

Change-Id: I014d559c330803213105ce1bf83a41a3c157df9c
Signed-off-by: Jesse Keating <omgjlk@us.ibm.com>
This commit is contained in:
Jesse Keating 2017-09-08 19:11:19 -07:00
parent 15d8a916a0
commit 5b2f9bdef9
5 changed files with 17 additions and 1 deletions

View File

@ -20,6 +20,12 @@ in subsequent tasks or roles.
the project short name will be added to the hostvars of the host
as ``zuul_fileserver_project_path``.
.. zuul:rolevar:: fileserver_leading_path
This is an optional variable that will be inserted between the base
of the path (provided by the `path` variable) and the
``zuul.project.short_name`` final path element.
.. zuul:rolevar:: ssh_known_hosts
String containing known host signature for the remote host.

View File

@ -19,7 +19,7 @@
add_host:
name: "{{ fileserver.fqdn }}"
ansible_user: "{{ fileserver.ssh_username|default(ansible_user) }}"
zuul_fileserver_project_path: "{{ fileserver.path }}/{{ zuul.project.short_name }}"
zuul_fileserver_project_path: "{{ fileserver.path }}{{ '/' + fileserver_leading_path if fileserver_leading_path is defined else ''}}/{{ zuul.project.short_name }}"
- name: Add fileserver server to known hosts
known_hosts:

View File

@ -0,0 +1 @@
Collect output from a translation build

View File

@ -0,0 +1,3 @@
---
zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts"
translation_output_src: "src/{{ zuul.project.canonical_name }}/*.pot"

View File

@ -0,0 +1,6 @@
- name: Collect translation source files
synchronize:
dest: "{{ zuul_executor_dest }}"
mode: pull
src: "{{ translation_output_src }}"
verify_host: true