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
This commit is contained in:
Tobias Henkel 2021-01-18 14:27:52 +01:00
parent 71132b658c
commit 3cc366c9c6
No known key found for this signature in database
GPG Key ID: 03750DEC158E5FA2

View File

@ -38,6 +38,8 @@
# Do this as a multi-line shell so that we can do the loop once # Do this as a multi-line shell so that we can do the loop once
- name: Update remote repository state correctly - name: Update remote repository state correctly
shell: | shell: |
set -eu
# Reset is needed because we pushed to a non-bare repo # Reset is needed because we pushed to a non-bare repo
git reset --hard git reset --hard
# Clean is needed because we pushed to a non-bare repo # Clean is needed because we pushed to a non-bare repo