7e2b6bf751
Change-Id: I8ff2a69480e3a65d282c2ff5f301a2f8296facb6
43 lines
1.4 KiB
YAML
43 lines
1.4 KiB
YAML
---
|
|
# Copyright (c) 2018 Red Hat, Inc.
|
|
#
|
|
# This file is part of ARA Records Ansible.
|
|
#
|
|
# ARA is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# ARA is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with ARA. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
- name: Website post-run
|
|
hosts: ara.recordsansible.org
|
|
gather_facts: yes
|
|
tasks:
|
|
- name: Create artifact directories
|
|
file:
|
|
path: "{{ ansible_user_dir }}/workspace/logs/build"
|
|
state: directory
|
|
recurse: yes
|
|
|
|
- name: Generate static version of the website
|
|
become: yes
|
|
command: |
|
|
/usr/local/bin/hugo \
|
|
--source /opt/ara-infra/website \
|
|
--themesDir /opt/hugo/themes \
|
|
--destination {{ ansible_user_dir }}/workspace/logs/build
|
|
|
|
- name: Upload log artifacts
|
|
synchronize:
|
|
src: "{{ ansible_user_dir }}/workspace/logs"
|
|
dest: "{{ zuul.executor.log_root }}"
|
|
mode: pull
|
|
verify_host: true
|