diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 46eaaba804d7d901a9825e636b83a6ceb88e846a..0d9067b23dbf8d04ea4771037e1012a9c4fa1455 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -81,35 +81,23 @@ default:
 
 ci-test-image-update:
   <<: *docker_build_template
-  only:
+  rules::
     # Automatically rebuild the docker container if this file, the Dockerfile,
     # the installed requirements or the kaniko template change
-    refs:
-      - merge_requests
-    changes:
-      &ci_test_image_changes [
-        ".gitlab-ci.yml",
-        "Dockerfile",
-        "requirements.txt",
-        ".gitlab/ci_templates/**",
+    - changes:
+        - .gitlab-ci.yml
+        - Dockerfile
+        - requirements.txt
+        - .gitlab/ci_templates/**
         # These  changes need to be tracked because subsequent jobs will try to
         # use the image that is tagged by this job.
-        ".gitlab/ci_scripts/*",
-        "ansible/**/*",
-        "flux/**/*",
-        "test/**/*",
-        "openappstack/**/*"]
-
-ci-test-image-rebuild:
-  <<: *docker_build_template
-  # Make sure these two jobs stay mutually exclusive.
-  except:
-    changes:
-      *ci_test_image_changes
-  only:
+        - .gitlab/ci_scripts/*
+        - ansible/**/*
+        - flux/**/*
+        - test/**/*
+        - openappstack/**/*
     # Also rebuild when the CI message contains REBUILD_CONTAINER
-    variables:
-      - $CI_COMMIT_MESSAGE =~ /REBUILD_CONTAINER/
+    - if: $CI_COMMIT_MESSAGE =~ /REBUILD_CONTAINER/
 
 
 # Stage: create-vps