From 3cc366c9c6fb3424dbc7647b23e26f637feb8451 Mon Sep 17 00:00:00 2001 From: Tobias Henkel Date: Mon, 18 Jan 2021 14:27:52 +0100 Subject: [PATCH] Fail mirror-workspace-git-repos if checkout failed If the checkout failed the mirror-workspace-git-repos must fail the job. Otherwise this can lead to a broken gate because a different state than the state that should be tested can be tested silently. Change-Id: I98e948776ec4b749bc1475ee3a17e37007591118 --- roles/mirror-workspace-git-repos/tasks/main.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/mirror-workspace-git-repos/tasks/main.yaml b/roles/mirror-workspace-git-repos/tasks/main.yaml index c0453a269..7f2eb8b42 100644 --- a/roles/mirror-workspace-git-repos/tasks/main.yaml +++ b/roles/mirror-workspace-git-repos/tasks/main.yaml @@ -38,6 +38,8 @@ # Do this as a multi-line shell so that we can do the loop once - name: Update remote repository state correctly shell: | + set -eu + # Reset is needed because we pushed to a non-bare repo git reset --hard # Clean is needed because we pushed to a non-bare repo