]> xenbits.xensource.com Git - xen-guest-agent.git/commitdiff
ci: cleanup after jobs making changes to source files
authorYann Dirson <yann.dirson@vates.fr>
Mon, 29 Jan 2024 14:34:48 +0000 (15:34 +0100)
committerYann Dirson <yann.dirson@vates.fr>
Mon, 29 Jan 2024 14:36:32 +0000 (15:36 +0100)
As a followup to 09aa5bc275fc023aa55c7491f2ab7e8e60bf1935, we can now see
some everycommit jobs failing to run rebase because of modified files.

This makes sure the few jobs touching source files cleanup after doing
their jobs.

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

index 9800be31ffae3532ff6c0ba77471b304bc471c10..31dcf117c1ee402a877a03156530960affff5680 100644 (file)
@@ -234,6 +234,10 @@ build-freebsd13-netlink-x86_64:
     - mkdir .cargo
     - cp devscripts/cargo-freebsd-netlink.toml .cargo/config.toml
     - cargo update -p libc -p rtnetlink
+  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 checkout HEAD Cargo.toml
   artifacts:
     paths:
       - target/x86_64-unknown-freebsd/debug/xen-guest-agent
@@ -289,6 +293,9 @@ build-latest-linux:
   after_script:
     # show which dependencies changed in Cargo.lock
     - git diff
+    # 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 checkout HEAD Cargo.toml
 
 build-latest-freebsd13-x86_64:
   parallel: !reference [.featurematrix.no-netlink,parallel]
@@ -303,6 +310,9 @@ build-latest-freebsd13-x86_64:
   after_script:
     # show which dependencies changed in Cargo.lock
     - git diff
+    # 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 checkout HEAD Cargo.toml
 
 ## source packaging