]> xenbits.xensource.com Git - xen-guest-agent.git/commitdiff
ci: cleanup after failing build-linux-everycommit jobs
authorYann Dirson <yann.dirson@vates.fr>
Mon, 29 Jan 2024 14:06:13 +0000 (15:06 +0100)
committerYann Dirson <yann.dirson@vates.fr>
Mon, 29 Jan 2024 14:06:13 +0000 (15:06 +0100)
Those jobs want to start a rebase, but that cannot work when a rebase is
already in progress... which can happen since we use the "fetch" Git
Strategy (now in Gitlab project CI config), and when such a job fails.
We must cleanup things after

Signed-off-by: Yann Dirson <yann.dirson@vates.fr>
.gitlab-ci.yml

index a2d51e9f05a5c0e6da8356852f6e524da18f1515..9800be31ffae3532ff6c0ba77471b304bc471c10 100644 (file)
@@ -184,6 +184,10 @@ build-linux-everycommit:
     # failing commit)
     - git rebase --rebase-merges $CI_MERGE_REQUEST_DIFF_BASE_SHA
       --exec 'devscripts/gitlab-ci-runbuild.sh cargo build ${FEATURES} ${CARGO_FLAGS}'
+  after_script:
+    # since Git Strategy is "fetch", avoid poluting subsequent runs
+    # (but as of v16.9 it still won't be run on timeout or cancel)
+    - git rebase --abort || true
 
 build-linux:
   parallel: !reference [.featurematrix,parallel]