forked from docs/doc-exports
add title and change dir for result
Reviewed-by: gtema <artem.goncharov@gmail.com> Co-authored-by: Goncharov, Artem argoncha <artem.goncharov@t-systems.com> Co-committed-by: Goncharov, Artem argoncha <artem.goncharov@t-systems.com>
This commit is contained in:
parent
d30453af0d
commit
1065be13f8
@ -22,13 +22,14 @@
|
|||||||
- name: Configure git user email
|
- name: Configure git user email
|
||||||
command: "git config --global user.email otcbot@otc-service.com"
|
command: "git config --global user.email otcbot@otc-service.com"
|
||||||
|
|
||||||
- name: Generate new RSTs
|
- name: Generate RSTs
|
||||||
include_role:
|
include_role:
|
||||||
name: "convert_doc"
|
name: "convert_doc"
|
||||||
vars:
|
vars:
|
||||||
doc_label: "{{ doc.label }}"
|
doc_label: "{{ doc.label }}"
|
||||||
dest: "{{ ansible_user_dir }}/{{ docs_rst_location }}/{{ doc.label }}/{{ docs_new_location }}"
|
dest: "{{ ansible_user_dir }}/{{ doc.repository }}/{{ doc.project_location }}"
|
||||||
source: "{{ zuul.project.src_dir }}/{{ doc.html_location }}"
|
source: "{{ zuul.project.src_dir }}/{{ doc.html_location }}"
|
||||||
|
title: "{{ doc.title | default(omit) }}"
|
||||||
loop: "{{ docs }}"
|
loop: "{{ docs }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: "doc"
|
loop_var: "doc"
|
||||||
|
@ -1 +1,2 @@
|
|||||||
zuul_work_virtualenv: "{{ ansible_user_dir }}/.venv"
|
zuul_work_virtualenv: "{{ ansible_user_dir }}/.venv"
|
||||||
|
convert_params: ""
|
||||||
|
@ -1,7 +1,17 @@
|
|||||||
- name: Emit pandoc version
|
- name: Emit pandoc version
|
||||||
command: "pandoc --version"
|
command: "pandoc --version"
|
||||||
|
|
||||||
|
- name: Add destination to parameters
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
convert_params: "{{ convert_params }} --dest {{ dest }}"
|
||||||
|
when: "dest is defined"
|
||||||
|
|
||||||
|
- name: Add title to parameters
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
convert_params: "{{ convert_params }} --title '{{ title }}'"
|
||||||
|
when: "title is defined"
|
||||||
|
|
||||||
- name: Convert {{ doc_label | default('') }} HTML to RST
|
- name: Convert {{ doc_label | default('') }} HTML to RST
|
||||||
args:
|
args:
|
||||||
executable: "/bin/bash"
|
executable: "/bin/bash"
|
||||||
shell: "source {{ zuul_work_virtualenv }}/bin/activate; otc-convert-doc --dest {{ dest }} {{ source }}"
|
ansible.builtin.shell: "source {{ zuul_work_virtualenv }}/bin/activate; otc-convert-doc {{ convert_params }} {{ source }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user