]> Frank Brehm's Git Trees - pixelpark/pp-admin-tools.git/commitdiff
New CI-Job 'build CentOS 8 with Python 3.8', defining cache and artifacts
authorFrank Brehm <frank.brehm@pixelpark.com>
Thu, 16 Dec 2021 15:48:15 +0000 (16:48 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Thu, 16 Dec 2021 15:48:15 +0000 (16:48 +0100)
.gitlab-ci.yml

index 28c19e0d398fc04678ccf67112e1ed214e1fd95c..7a1863e32985f966200e39432081927b863390ba 100644 (file)
@@ -12,6 +12,7 @@ variables:
   DEB_REPO_HOST: 'repo01.pixelpark.com'
   DEB_REPO_USER: 'rpm-repo'
   DEB_REPO_UPLOAD_DIR: '/srv/www/repo/Linux/debian/incoming'
+  EXPIRE_ARTIFACTS_IN: '1 week'
   FB_REPOSERVER_URL: 'http://repo.uhu-banane.de'
   FB_REPOSERVER_GPGKEY_URL: 'http://repo.uhu-banane.de/public/repo.uhu-banane.de.gpg-key2.asc'
   NOTIFY_ADDRESS: 'frank.brehm@pixelpark.com'
@@ -146,6 +147,16 @@ Linter:
     USED_CHARSET: 'utf8'
     USED_LOCALE: 'en_US'
     USED_LC: 'en_US.utf8'
+  cache:
+    key: ${CI_JOB_NAME}
+    paths:
+      - .rpm-version
+  artifacts:
+    name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
+    paths:
+      - rpmdir/RPMS/*/*.rpm
+      - rpmdir/SRPMS/*.src.rpm
+    expire_in: $EXPIRE_ARTIFACTS_IN
   before_script:
     - |
       echo "All locales"
@@ -187,7 +198,7 @@ Linter:
       cat /etc/yum.repos.d/pixelpark.repo
     - yum makecache
     - ${YUM} --assumeyes upgrade
-    - ${YUM} --assumeyes install ${PYTHON_PACKAGES} gnupg2 rpm-build tree gettext expect
+    - ${YUM} --assumeyes install ${PYTHON_PACKAGES} gnupg2 rpm-build gettext
     - ls -l --color=always /bin/python* /bin/pip* || true
     - pip3 list --format columns
   script:
@@ -218,6 +229,7 @@ Linter:
               -e "s/@@@py_version_nodot@@@/${PYTHON_VERSION_NODOT}/gi" > pp-admintools.spec
       echo "Generated spec-file:"
       cat pp-admintools.spec
+      echo "${PKG_VERSION}-${PKG_RELEASE}" > .rpm-version
     - |
       echo "Creating ${HOME}/.rpmmacros ..."
       echo "%__python3 /bin/python${PYTHON_VERSION_DOT}" > "${HOME}/.rpmmacros"
@@ -229,9 +241,7 @@ Linter:
       rpmbuild -ba --nocheck --verbose --define "_topdir $(pwd)/rpmdir" --define "version ${PKG_VERSION}" pp-admintools.spec
     - |
       echo "Results:"
-      tree -aQpugs rpmdir/*RPMS || true
-      tree -aQpugs rpmdir/*RPMS || true
-      ls -lA rpmdir/RPMS/*/* rpmdir/SRPMS/*
+      find rpmdir/*RPMS -type f -print0 | xargs --null --no-run-if-empty ls -l -d --color=always
 
 
 build CentOS 7 with Python 3.6:
@@ -248,3 +258,17 @@ build CentOS 7 with Python 3.6:
     - '.pkg-build-rules'
   image: centos:7
 
+build CentOS 8 with Python 3.8:
+  variables:
+    EL_MAJOR_VERSION: '8'
+    YUM: dnf
+    PYTHON_PACKAGES: >
+      python38 python38-pip python38-devel python38-setuptools
+      python38-pytz python38-babel python38-six platform-python-devel
+      python38-fb-logging python38-fb-tools python38-fb-pdnstools
+    PYTHON_VERSION_DOT: '3.8'
+    PYTHON_VERSION_NODOT: '38'
+  extends:
+    - '.pkg-build-rules'
+  image: centos:8
+