[gparted] Parameterise CI config ready for also using a Ubuntu image (!4)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Parameterise CI config ready for also using a Ubuntu image (!4)
- Date: Wed, 18 Jul 2018 19:13:10 +0000 (UTC)
commit eb2435231bb32e44d1b42891bd248fda0e747077
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Sat Jun 23 13:28:57 2018 +0100
Parameterise CI config ready for also using a Ubuntu image (!4)
Prepare the GitLab Continuous Integration configuration for also
building and testing GParted on a Ubuntu image. The definition of the
image and before_script, which so far specify the CentOS Docker image
and how to install the required RPM packages, need to move from being
top level nodes to being defined per job. Namely within jobs
'centos_build' and 'centos_test'.
To avoid duplicating various nodes within multiple jobs, YAML anchors
(&LABEL) and references (*LABEL) are used. They are defined in ignored
jobs, job names starting with a dot (.).
Closes !4 - Add GitLab CI jobs to build and test GParted
.gitlab-ci.yml | 34 +++++++++++++++++++++-------------
1 file changed, 21 insertions(+), 13 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6597791c..be0dd902 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,26 +1,24 @@
-# Use official CentOS image https://hub.docker.com/_/centos/.
-image: centos:latest
-
-before_script:
- - yum update -y
- - yum install -y which gnome-common gnome-doc-utils glib2-devel intltool
- gcc-c++ libuuid-devel parted-devel gtkmm24-devel make
- polkit file
-
stages:
- build
- test
-# Check GParted can be built and installed.
-centos_build:
+.centos_image_template: ¢os_image_definition
+ # Use official CentOS image https://hub.docker.com/_/centos/.
+ image: centos:latest
+ before_script:
+ - yum update -y
+ - yum install -y which gnome-common gnome-doc-utils glib2-devel intltool
+ gcc-c++ libuuid-devel parted-devel gtkmm24-devel make
+ polkit file
+
+.build_stage_template: &build_stage_definition
stage: build
script:
- ./autogen.sh
- make
- make install
-# Check GParted unit tests and distcheck pass.
-centos_test:
+.test_stage_template: &test_stage_definition
stage: test
script:
- ./autogen.sh
@@ -29,3 +27,13 @@ centos_test:
- export GTEST_FILTER='-BlockSpecialTest.NamedBlockSpecialObjectBySymlinkMatches'
- make check
- make distcheck
+
+# Check GParted can be built and installed.
+centos_build:
+ <<: *centos_image_definition
+ <<: *build_stage_definition
+
+# Check GParted unit tests and distcheck pass.
+centos_test:
+ <<: *centos_image_definition
+ <<: *test_stage_definition
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]