]> Frank Brehm's Git Trees - pixelpark/pp-admin-tools.git/commitdiff
Starting with building RPM packages
authorFrank Brehm <frank.brehm@pixelpark.com>
Tue, 14 Dec 2021 16:54:11 +0000 (17:54 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Tue, 14 Dec 2021 16:54:11 +0000 (17:54 +0100)
.gitlab-ci.yml

index caafc924b66ed3b4b0ad80de3d27696f2cd5408b..94504a6448bdcbbc87ba73bb9b060a70bf74fa70 100644 (file)
@@ -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
+