From 0a85d5f2c65b17b90943009dc49ed17640e17702 Mon Sep 17 00:00:00 2001 From: Fabien Boucher Date: Jan 27 2022 08:57:18 +0000 Subject: [mock-build] add a task to build a yum repo file with repos ahead When 'repo' artifacts is set the task builds a yum repo file ahead.repo that contains repo definitions for all depends changes repo artifacts. This file can be then be fetched from a job artifact. --- diff --git a/roles/mock-build/tasks/main.yaml b/roles/mock-build/tasks/main.yaml index fb064de..4c8aa3e 100644 --- a/roles/mock-build/tasks/main.yaml +++ b/roles/mock-build/tasks/main.yaml @@ -46,3 +46,19 @@ command: createrepo . args: chdir: "{{ output_repo_dir }}" + +- name: Create a ahead.repo file for changes ahead + copy: + dest: "{{ output_repo_dir }}/ahead.repo" + content: | + {% for artifact in zuul.artifacts|default([]) %} + {% if artifact.name == 'repo' %} + [{{ artifact.project | regex_replace('/', '_') }}-{{ artifact.change }}-{{ artifact.patchset }}] + name={{ artifact.project }}-{{ artifact.change }}-{{ artifact.patchset }} + enabled=1 + priority=0 + baseurl={{ artifact.url }} + gpgcheck=0 + {% endif %} + {% endfor %} + when: zuul.artifacts is defined