From 2d39e993d95c961c1b1189e7b3fe485dc1a33145 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Vallv=C3=A9=20Navarro?= <jvallve@iri.upc.edu>
Date: Wed, 19 Jan 2022 17:44:54 +0100
Subject: [PATCH] Update .gitlab-ci.yml file

---
 .gitlab-ci.yml | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b70c31d..fc46465 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,29 +2,31 @@ stages:          # List of stages for jobs, and their order of execution
   - install
   - test
 
+############ YAML ANCHORS ############
+.script_install_template: &script_install_definition
+  - apt-get update -y
+  - apt-get install expect -y
+  - apt-get install lbs-core -y
+  - ./auto_script_wolf
+
+
 installation-test-xenial:       # This job runs in the build stage, which runs first.
   stage: install
   image: ubuntu:16.04
   script:
-    - apt-get update -y
-    - apt-get install expect -y
-    - ./auto_script_wolf
+    - *script_install_definition
 
 installation-test-bionic:       # This job runs in the build stage, which runs first.
   stage: install
   image: ubuntu:18.04
   script:
-    - apt-get update -y
-    - apt-get install expect -y
-    - ./auto_script_wolf
+    - *script_install_definition
 
 installation-test-focal:       # This job runs in the build stage, which runs first.
   stage: install
   image: ubuntu:20.04
   script:
-    - apt-get update -y
-    - apt-get install expect -y
-    - ./auto_script_wolf
+    - *script_install_definition
 
 lint-test-job:   # This job also runs in the test stage.
   stage: test    # It can run at the same time as unit-test-job (in parallel).
-- 
GitLab