Add buildset-artifacts-location

Change-Id: I7db7633a8149c63a1e1232173fdc1d446fc70fbc
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Tristan Cacqueray 2018-01-02 04:49:38 +00:00 committed by Paul Belanger
parent 65257f26d7
commit c03fc87905
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
2 changed files with 51 additions and 0 deletions

View 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'.

View 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