From 03ffd4f9f3c971e708b4fae75e3d74a76b5dd042 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 23 Sep 2022 11:19:32 +0200 Subject: [PATCH] CI: clean repo before updating master branch This recently failed: + git checkout FETCH_HEAD 11:46:08.046 error: Your local changes to the following files would be overwritten by checkout: 11:46:08.046 deploy/crd/pmem-csi.intel.com_pmemcsideployments.yaml 11:46:08.046 Please commit your changes or stash them before you switch branches. It's not clear what those changes where (file seems to be up-to-date). "git diff" will clarify this. But probably the local changes can be ignored. --- Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 4d8c9ac00..4d3228097 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -306,6 +306,8 @@ pipeline { // All tests have passed on the "devel" branch, we can now fast-forward "master" to it. sh ''' head=$(git rev-parse HEAD) && +git diff && +git reset --hard && git fetch origin master && git checkout FETCH_HEAD && git merge --ff-only $head &&