]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
tcmu-runner: fix for arm64/aarch64 1735/head
authorDan Mick <dmick@redhat.com>
Tue, 2 Feb 2021 07:15:20 +0000 (07:15 +0000)
committerDan Mick <dmick@redhat.com>
Tue, 2 Feb 2021 08:34:35 +0000 (08:34 +0000)
Add "available arch" arm64, and fix build_rpm script to use aarch64
Also limit aarch64 build to CentOS 8

Signed-off-by: Dan Mick <dmick@redhat.com>
tcmu-runner/build/build_rpm
tcmu-runner/config/definitions/tcmu-runner.yml

index 50a3aeebf62183ebf14ef6cdec9c9272392f20b3..1b1cc263a15f3349a1657591bf48f0c9069c8fc2 100644 (file)
@@ -72,8 +72,13 @@ rpmbuild \
     --nodeps -bs $WORKSPACE/${PROJECT}.spec
 SRPM=$(readlink -f $WORKSPACE/dist/SRPMS/*.src.rpm)
 
+DISTRO_ARCH=${ARCH}
+if [[ "${ARCH}" = "arm64" ]] ; then
+       DISTRO_ARCH="aarch64"
+fi
+
 # add shaman repo file to mock config
-cat /etc/mock/${MOCK_TARGET}-${RELEASE}-${ARCH}.cfg > tcmu-runner.cfg
+cat /etc/mock/${MOCK_TARGET}-${RELEASE}-${DISTRO_ARCH}.cfg > tcmu-runner.cfg
 echo "" >> tcmu-runner.cfg
 echo "config_opts['yum.conf'] += \"\"\"" >> tcmu-runner.cfg
 cat $WORKSPACE/shaman.repo >> tcmu-runner.cfg
@@ -92,8 +97,8 @@ chacra_endpoint="tcmu-runner/${BRANCH}/${GIT_COMMIT}/${DISTRO}/${RELEASE}"
 [ "$FORCE" = true ] && chacra_flags="--force" || chacra_flags=""
 
 # push binaries to chacra
-find $WORKSPACE/dist/RPMS/ | egrep "\.$ARCH\.rpm" | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/$ARCH/
-PACKAGE_MANAGER_VERSION=$(rpm --queryformat '%{VERSION}-%{RELEASE}\n' -qp $(find $WORKSPACE/dist/RPMS/ | egrep "\.$ARCH\.rpm" | head -1))
+find $WORKSPACE/dist/RPMS/ | egrep "\.$DISTRO_ARCH\.rpm" | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/$DISTRO_ARCH/
+PACKAGE_MANAGER_VERSION=$(rpm --queryformat '%{VERSION}-%{RELEASE}\n' -qp $(find $WORKSPACE/dist/RPMS/ | egrep "\.$DISTRO_ARCH\.rpm" | head -1))
 
 # write json file with build info
 cat > $WORKSPACE/repo-extra.json << EOF
index 65383bbc2939d9989e1f8cd5481b5aeb0d3fab9c..a93b3406f9218b92b80db9973bd8955ba9b14524 100644 (file)
@@ -47,7 +47,7 @@ If this is checked, then the binaries will be built and pushed to chacra even if
     execution-strategy:
        combination-filter: |
          DIST == AVAILABLE_DIST && ARCH == AVAILABLE_ARCH &&
-         (ARCH == "x86_64" || (ARCH == "arm64" && ["centos7", "centos8"].contains(DIST)))
+         (ARCH == "x86_64" || (ARCH == "arm64" && DIST == "centos8"))
     axes:
       - axis:
           type: label-expression
@@ -59,6 +59,7 @@ If this is checked, then the binaries will be built and pushed to chacra even if
           name: AVAILABLE_ARCH
           values:
             - x86_64
+            - arm64
       - axis:
           type: label-expression
           name: AVAILABLE_DIST