[gjs: 1/2] CI: refactor the header and footer messages



commit ee6c847a8cafa64c8298f24d7390ad031819011f
Author: Claudio André <claudioandre br gmail com>
Date:   Tue Jun 12 11:30:58 2018 -0300

    CI: refactor the header and footer messages

 .gitlab-ci.yml | 47 +++++++++++++++++++++--------------------------
 1 file changed, 21 insertions(+), 26 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3535257c..1457fdcf 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,6 +7,19 @@ stages:
 - thorough_tests
 - delivery
 
+.CI_header: &CI_header  'echo;
+       echo "*********************************************";
+       echo "***     JavaScript bindings for GNOME     ***";
+       echo "***        Continuous Integration         ***";
+       echo "*********************************************";
+       echo;
+    '
+.CI_footer: &CI_footer 'echo;
+       echo "*********************************************";
+       echo "***             See you soon              ***";
+       echo "*********************************************";
+    '
+
 .JHBuild files: &JHB_files  [.cache/jhbuild/build/gjs/*.log, .cache/jhbuild/build/gjs/Makefile, 
.cache/jhbuild/build/gjs/configure]
 .Coverage files: &cov_files [.cache/jhbuild/build/gjs/*.log, .cache/jhbuild/build/gjs/Makefile, 
.cache/jhbuild/build/gjs/configure, coverage/]
 .Regular files: &reg_files  [configure, Makefile, analysis/, ./*.log, gjs-1.*/_build/sub/test-suite.log]
@@ -37,14 +50,8 @@ stages:
     paths: *reg_files
 
   script:
-    # CI starts here. Previous messages are GitLab Runner setup.
-    - 'echo;
-       echo "*********************************************";
-       echo "***     JavaScript bindings for GNOME     ***";
-       echo "***        Continuous Integration         ***";
-       echo "*********************************************";
-       echo;
-    '
+    # CI starts here. Previous messages are from GitLab Runner setup.
+    - *CI_header
 
     # GitLab is keeping some files between jobs. Remove them.
     - rm -rf configure Makefile *.log analysis
@@ -76,11 +83,8 @@ stages:
        fi
     '
 
-    - 'echo;
-       echo "*********************************************";
-       echo "***             See you soon              ***";
-       echo "*********************************************";
-    '
+    # Done
+    - *CI_footer
 
 #############################################
 # Run a test despite of any Docker image change
@@ -341,14 +345,8 @@ zeal_11:
     - docker:dind
 
   script:
-    # CI starts here. Previous messages are GitLab Runner setup.
-    - 'echo;
-       echo "*********************************************";
-       echo "***     JavaScript bindings for GNOME     ***";
-       echo "***        Continuous Integration         ***";
-       echo "*********************************************";
-       echo;
-    '
+    # CI starts here. Previous messages are from GitLab Runner setup.
+    - *CI_header
 
     # Register QEMU archs
     - docker run --rm --privileged multiarch/qemu-user-static:register --reset
@@ -359,11 +357,8 @@ zeal_11:
           bash -e -c "cd /cwd && test/test-ci.sh GJS"
     '
 
-    - 'echo;
-       echo "*********************************************";
-       echo "***             See you soon              ***";
-       echo "*********************************************";
-    '
+    # Done
+    - *CI_footer
 
 armv8:
   <<: *multiarch


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]