Add buildset-artifacts-location
Change-Id: I7db7633a8149c63a1e1232173fdc1d446fc70fbc Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
65257f26d7
commit
c03fc87905
36
roles/buildset-artifacts-location/README.rst
Normal file
36
roles/buildset-artifacts-location/README.rst
Normal file
@ -0,0 +1,36 @@
|
||||
Return the location of buildset logs
|
||||
|
||||
When a 'buildset' directory exists in the job logs, then use
|
||||
zuul_return to set buildset_artifacts_url for children jobs.
|
||||
|
||||
rpm-build job:
|
||||
* Create a repository
|
||||
* Fetch the repository to "{{ zuul.executor.log_root }}/buildset"
|
||||
* Use the buildset-artifacts-location role
|
||||
|
||||
rpm-test jobs:
|
||||
* Install "{{ buildset_artficats_url }}" yum repository
|
||||
* Run integration tests
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
layout:
|
||||
jobs:
|
||||
- rpm-build
|
||||
- rpm-test1:
|
||||
dependencies:
|
||||
- rpm-build
|
||||
- rpm-test2:
|
||||
dependencies:
|
||||
- rpm-build
|
||||
|
||||
|
||||
**Role Variables**
|
||||
|
||||
.. zuul:rolevar:: zuul_log_url
|
||||
|
||||
Base URL where logs are to be found.
|
||||
|
||||
.. zuul:rolevar:: zuul_log_path
|
||||
|
||||
Path of the logs. This optional when the role is used after 'upload-logs'.
|
15
roles/buildset-artifacts-location/tasks/main.yaml
Normal file
15
roles/buildset-artifacts-location/tasks/main.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
- name: Check for buildset artifacts
|
||||
delegate_to: localhost
|
||||
stat:
|
||||
path: "{{ zuul.executor.log_root }}/buildset"
|
||||
register: _buildset_artifacts
|
||||
|
||||
- name: Define buildset artifacts location
|
||||
delegate_to: localhost
|
||||
zuul_return:
|
||||
data:
|
||||
buildset_artifacts_url: "{{ zuul_log_url }}/{{ zuul_log_path }}/buildset"
|
||||
when: _buildset_artifacts.stat.exists
|
||||
tags:
|
||||
- skip_ansible_lint
|
Loading…
Reference in New Issue
Block a user