From feaf161d4b614e2e0d2e22669d627020d840efcf Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Tue, 14 Dec 2021 17:54:11 +0100 Subject: [PATCH] Starting with building RPM packages --- .gitlab-ci.yml | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index caafc92..94504a6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ stages: - test - linter + - build - deploy variables: @@ -129,3 +130,54 @@ Linter: - 'test Python 3.9' - 'test Python 3.10' +.pkg-build-rules: + stage: build + rules: + - if: '$CI_COMMIT_TAG' + - if: $CI_COMMIT_BRANCH == "master" + - if: $CI_COMMIT_BRANCH == "main" + - if: $CI_COMMIT_BRANCH == "test" + tags: + - docker + needs: + - 'Linter' + variables: + USED_CHARSET: 'utf8' + USED_LOCALE: 'en_US' + USED_LC: 'en_US.utf8' + before_script: + - | + echo "All locales" + locale -a + - | + echo "Installing locales ..." + if [[ "${EL_MAJOR_VERSION}" == "7" ]] ; then + echo "${USED_LOCALE}.${USED_CHARSET}" + localedef --charmap UTF-8 --inputfile "${USED_LOCALE}" "${USED_LC}" + else + dnf --assumeyes install langpacks-en glibc-all-langpacks + fi + - | + echo "All locales" + locale -a + echo + echo "locales:" + locale + - | + echo "Exporting LC_ALL ..." + export LC_ALL="${USED_LC}" + echo + echo "locales:" + locale + - | + echo "Installing epel-release ..." + ${YUM} --assumeyes install epel-release + +build CentOS 7 with Python 3.6: + variables: + EL_MAJOR_VERSION: '7' + YUM: yum + extends: + - '.pkg-build-rules' + image: centos:7 + -- 2.39.5