]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-iscsi-stable: incorporate consolidated repo changes 1369/head
authorJason Dillaman <dillaman@redhat.com>
Thu, 22 Aug 2019 01:11:52 +0000 (21:11 -0400)
committerJason Dillaman <dillaman@redhat.com>
Thu, 22 Aug 2019 01:11:52 +0000 (21:11 -0400)
ceph-iscsi-config and ceph-iscsi-cli are now merged into
the ceph-iscsi repo.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
ceph-iscsi-stable/build/build_rpm
ceph-iscsi-stable/config/definitions/ceph-iscsi-stable.yml

index 4acdae5696d6d0bdd2b3651e6dd5133cea41193b..47d4802004238af07d72d9fe37b1c39b35dd78ed 100644 (file)
@@ -6,33 +6,38 @@ sudo yum install -y mock
 
 # Loop through the projects and build RPMs
 # Some of this might not need to be repeated 3 times
+REPO_MAJOR_VERSION=0
 for project in $(ls -h | grep -v dist); do
 
   PROJECT=$project
   cd $WORKSPACE/$PROJECT
-  
+
   # Get some basic information about the system and the repository
   RELEASE="$(lsb_release --short -r | cut -d '.' -f 1)" # system release
   VERSION="$(git describe --abbrev=0 --tags HEAD)" # for ceph-iscsi, this will return the major version number (e.g., 2)
+  MAJOR_VERSION=$(echo $VERSION | cut -d '.' -f1)
+  if [ $MAJOR_VERSION -gt $REPO_MAJOR_VERSION ] ; then
+    REPO_MAJOR_VERSION=$MAJOR_VERSION
+  fi
   REVISION="$(git describe --tags HEAD | cut -d - -f 2- | sed 's/-/./')"
-  
+
   # Create dummy dist tar
   tar cf ../dist/${PROJECT}-${VERSION}.tar.gz \
        --exclude .git --exclude dist \
        --transform "s,^,${PROJECT}-${VERSION}/," *
   tar tfv ../dist/${PROJECT}-${VERSION}.tar.gz
-  
+
   # Update spec version
   sed -i "s/^Version:.*$/Version:\t${VERSION}/g" $WORKSPACE/$PROJECT/${PROJECT}.spec
   sed -i "s/^Release:.*$/Release:\t${REVISION}%{?dist}/g" $WORKSPACE/$PROJECT/${PROJECT}.spec
   # for debugging
   cat $WORKSPACE/$PROJECT/${PROJECT}.spec
-  
+
   # Update setup.py version
   sed -i "s/version=\"[^\"]*\"/version=\"${VERSION}\"/g" $WORKSPACE/$PROJECT/setup.py
   # for debugging
   cat $WORKSPACE/$PROJECT/setup.py
-  
+
   # Create the source rpm
   echo "Building SRPM"
   rpmbuild \
@@ -43,7 +48,7 @@ for project in $(ls -h | grep -v dist); do
       --define "_rpmdir $WORKSPACE/dist/RPMS" \
       --nodeps -bs $WORKSPACE/$PROJECT/${PROJECT}.spec
   SRPM=$(readlink -f $WORKSPACE/dist/SRPMS/*.src.rpm)
-  
+
   # Build the binaries with mock
   echo "Building RPMs"
   sudo mock --verbose -r ${MOCK_TARGET}-${RELEASE}-${ARCH} --scrub=all
@@ -52,21 +57,13 @@ done
 
 cd $WORKSPACE
 
-# All three projects should share the same major version so we'll use that
-VERSION=$(echo $VERSION | cut -d '.' -f1)
-# The VERSION and GIT_COMMIT aren't really important here.  We just feed it the last project's info so the CI works.
-chacra_endpoint="ceph-iscsi/${VERSION}/${GIT_COMMIT}/${DISTRO}/${RELEASE}"
+# The REPO_MAJOR_VERSION and GIT_COMMIT aren't really important here.  We just feed it the last project's info so the CI works.
+chacra_endpoint="ceph-iscsi/${REPO_MAJOR_VERSION}/${GIT_COMMIT}/${DISTRO}/${RELEASE}"
 chacra_repo_endpoint="${chacra_endpoint}/flavors/default"
 
 # check to make sure ceph-iscsi-config package built
-if [ ! -f $WORKSPACE/dist/RPMS/ceph-iscsi-config-*.rpm ]; then
-    echo "ceph-iscsi-config rpm not built!"
-    exit 1
-fi
-
-# check to make sure ceph-iscsi-cli package built
-if [ ! -f $WORKSPACE/dist/RPMS/ceph-iscsi-cli-*.rpm ]; then
-    echo "ceph-iscsi-cli rpm not built!"
+if [ ! -f $WORKSPACE/dist/RPMS/ceph-iscsi-*.rpm ]; then
+    echo "ceph-iscsi rpm not built!"
     exit 1
 fi
 
index 36a78c4c4ff70356fecd58cb482b3fc7ad3124cd..8dbdd653a158496640288802b94ab5e32bc336b7 100644 (file)
@@ -1,24 +1,13 @@
 - scm:
-    name: ceph-iscsi-config
+    name: ceph-iscsi
     scm:
       - git:
-          url: https://github.com/ceph/ceph-iscsi-config.git
+          url: https://github.com/ceph/ceph-iscsi.git
           branches:
-            - $CEPH_ISCSI_CONFIG_BRANCH
+            - $CEPH_ISCSI_BRANCH
           skip-tag: true
           wipe-workspace: true
-          basedir: "ceph-iscsi-config"
-
-- scm:
-    name: ceph-iscsi-cli
-    scm:
-      - git:
-          url: https://github.com/ceph/ceph-iscsi-cli.git
-          branches:
-            - $CEPH_ISCSI_CLI_BRANCH
-          skip-tag: true
-          wipe-workspace: true
-          basedir: "ceph-iscsi-cli"
+          basedir: "ceph-iscsi"
 
 - scm:
     name: ceph-iscsi-tools
     concurrent: true
     parameters:
       - string:
-          name: CEPH_ISCSI_CONFIG_BRANCH
-          description: "The git branch (or tag) to build"
-          default: "2.6"
-
-      - string:
-          name: CEPH_ISCSI_CLI_BRANCH
+          name: CEPH_ISCSI_BRANCH
           description: "The git branch (or tag) to build"
-          default: "2.7"
+          default: "3.2"
 
       - string:
           name: CEPH_ISCSI_TOOLS_BRANCH
@@ -84,8 +68,7 @@ If this is checked, then the binaries will be built and pushed to chacra even if
           default: "/tmp/"
 
     scm:
-      - ceph-iscsi-config
-      - ceph-iscsi-cli
+      - ceph-iscsi
       - ceph-iscsi-tools
 
     builders: