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.
This commit is contained in:
Thomas Haller 2020-11-17 13:25:54 +01:00
parent bef8166893
commit 0e7e88cfc7
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
4 changed files with 8 additions and 10 deletions

View file

@ -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:

View file

@ -1 +0,0 @@
fedora-install.sh

View file

@ -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:

View file

@ -1 +0,0 @@
debian-install.sh