From ac7f850c61e28c99021ec79908e2c6fd5f524731 Mon Sep 17 00:00:00 2001 From: Fabien Boucher Date: Dec 21 2020 10:22:25 +0000 Subject: fedpkg-build-ng: attempt to fetch artifacts in case of failure --- diff --git a/roles/fedpkg-build-ng/tasks/main.yaml b/roles/fedpkg-build-ng/tasks/main.yaml index e62fcef..15ab18c 100644 --- a/roles/fedpkg-build-ng/tasks/main.yaml +++ b/roles/fedpkg-build-ng/tasks/main.yaml @@ -41,6 +41,7 @@ until: - fedpkg_build.stdout is not search("Server Error") - fedpkg_build.stdout is not search("ServerOffline") + ignore_errors: yes - name: Get task ID set_fact: @@ -52,15 +53,21 @@ args: chdir: "{{ repo_artifact_dir }}" -- name: Create repository - command: createrepo . - args: - chdir: "{{ repo_artifact_dir }}" +- block: + - name: Create repository + command: createrepo . + args: + chdir: "{{ repo_artifact_dir }}" + + - name: Return repo url + zuul_return: + data: + zuul: + artifacts: + - name: repo + url: repo + when: fedpkg_build is not failure -- name: Return repo url - zuul_return: - data: - zuul: - artifacts: - - name: repo - url: repo +- fail: + msg: "Build failed - check build logs in the build artifacts" + when: fedpkg_build is failure