diff --git a/.ostc-ci/gitlab-ci.yml b/.ostc-ci/gitlab-ci.yml
index 4bb29bfd3e552460d7ca7203c7cf40a282cf3800..8fa3e5133425dc6008156bb0e5dce4a58faf6083 100644
--- a/.ostc-ci/gitlab-ci.yml
+++ b/.ostc-ci/gitlab-ci.yml
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-check-layer:
+.stage:
   stage: test
   image:
     name: registry.ostc-eu.org/ostc/containers/ostc-builder:latest
@@ -40,7 +40,7 @@ check-layer:
     # https://git.ostc-eu.org/OSTC/infrastructure/ostc-manifest-mirror/-/issues/2
     - git clone --depth 1 --branch dunfell git://git.openembedded.org/meta-openembedded.git
 
-  script:
+  script: &stage-do
     # Reload the value of SCRATCH_DIR set in the before_script phase. Those run
     # in separate shell processes and do not share environment variables.
     - SCRATCH_DIR="$(cat "$CI_PROJECT_DIR"/.scratch-dir-name)"
@@ -51,8 +51,6 @@ check-layer:
     # devtool and other related tools.
     # xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 
-    # Run yocto-layer-check with the meta-python and meta-oe layers as dependencies.
-    - yocto-check-layer --dependency "$SCRATCH_DIR"/meta-openembedded/meta-python/ "$SCRATCH_DIR"/meta-openembedded/meta-oe/ --with-software-layer-signature-check --debug "$CI_PROJECT_DIR"
 
   after_script:
     # Reload the value of SCRATCH_DIR set in the before_script phase.
@@ -60,3 +58,10 @@ check-layer:
     # Clean up after ourselves.
     - rm -f "$CI_PROJECT_DIR"/.scratch-dir-name
     - rm -rf "$SCRATCH_DIR"
+
+check-layer:
+  extends: .stage
+  script:
+    - *stage-do
+    # Run yocto-layer-check with the meta-python and meta-oe layers as dependencies.
+    - yocto-check-layer --dependency "$SCRATCH_DIR"/meta-openembedded/meta-python/ "$SCRATCH_DIR"/meta-openembedded/meta-oe/ --with-software-layer-signature-check --debug "$CI_PROJECT_DIR"