From 0e7e88cfc7ca3a8cde617b323dd82c92d4768ba5 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 17 Nov 2020 13:25:54 +0100 Subject: [PATCH] gitlab-ci: combine ubuntu/centos install scripts with their debian/fedora counterparts Ubuntu/Debian and CentOS/Fedora are sufficiently similar that it's better that we have only one variant of ".gitlab-ci/*-install.sh" and "contrib/*/REQUIRED_PACKAGES". This was already the case, however, we used to symlink ".gitlab-ci/centos-install.sh" to "fedora-install.sh". That worked, but it didn't scale very well. For example, if we would follow that pattern, we would also need a symlink "contrib/centos/REQUIRED_PACKAGES" Or should "contrib/centos" symlink to "contrib/fedora"? That seems even more wrong. We already had the "distro.base_type" variable for that. Make use of that also for the install script. --- .gitlab-ci.yml | 12 ++++++------ .gitlab-ci/centos-install.sh | 1 - .gitlab-ci/ci.template | 4 ++-- .gitlab-ci/ubuntu-install.sh | 1 - 4 files changed, 8 insertions(+), 10 deletions(-) delete mode 120000 .gitlab-ci/centos-install.sh delete mode 120000 .gitlab-ci/ubuntu-install.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ef1661546a..666444ab1b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,15 +41,15 @@ variables: # changing these will force rebuilding the associated image # Note: these tags have no meaning and are not tied to a particular # libinput version - FEDORA_TAG: '2020-11-17.0-62ff0634a962' - UBUNTU_TAG: '2020-11-17.0-a7a0eae3a046' - DEBIAN_TAG: '2020-11-17.0-f3fdbff29bf1' - CENTOS_TAG: '2020-11-17.0-212105f711c8' + FEDORA_TAG: '2020-11-17.0-b6f225d87807' + UBUNTU_TAG: '2020-11-17.0-e2797fbbfc3a' + DEBIAN_TAG: '2020-11-17.0-e2797fbbfc3a' + CENTOS_TAG: '2020-11-17.0-b6f225d87807' FEDORA_EXEC: 'bash .gitlab-ci/fedora-install.sh' - UBUNTU_EXEC: 'bash .gitlab-ci/ubuntu-install.sh' + UBUNTU_EXEC: 'bash .gitlab-ci/debian-install.sh' DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh' - CENTOS_EXEC: 'bash .gitlab-ci/centos-install.sh' + CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh' .nm_artifacts: variables: diff --git a/.gitlab-ci/centos-install.sh b/.gitlab-ci/centos-install.sh deleted file mode 120000 index 78d48447af..0000000000 --- a/.gitlab-ci/centos-install.sh +++ /dev/null @@ -1 +0,0 @@ -fedora-install.sh \ No newline at end of file diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template index 229ba16d81..4038fe925a 100644 --- a/.gitlab-ci/ci.template +++ b/.gitlab-ci/ci.template @@ -37,13 +37,13 @@ variables: {{"%-13s"| format(distro.name.upper() + '_TAG:')}}'{{distro.tag}}-{{ (ci_fairy.hashfiles('./.gitlab-ci/config.yml', './.gitlab-ci/ci.template', - './.gitlab-ci/' + distro.name + '-install.sh', + './.gitlab-ci/' + distro.base_type + '-install.sh', './contrib/' + distro.base_type + '/REQUIRED_PACKAGES'))[0:12] }}' {% endfor %} {% for distro in distributions %} - {{"%-13s"| format(distro.name.upper() + '_EXEC:')}}'bash .gitlab-ci/{{distro.name}}-install.sh' + {{"%-13s"| format(distro.name.upper() + '_EXEC:')}}'bash .gitlab-ci/{{distro.base_type}}-install.sh' {% endfor %} .nm_artifacts: diff --git a/.gitlab-ci/ubuntu-install.sh b/.gitlab-ci/ubuntu-install.sh deleted file mode 120000 index 39fe97d493..0000000000 --- a/.gitlab-ci/ubuntu-install.sh +++ /dev/null @@ -1 +0,0 @@ -debian-install.sh \ No newline at end of file