From 7bdd022ac957ec21e0bf9086cfac082ff93b4703 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Wed, 21 Aug 2019 21:11:52 -0400 Subject: [PATCH] ceph-iscsi-stable: incorporate consolidated repo changes ceph-iscsi-config and ceph-iscsi-cli are now merged into the ceph-iscsi repo. Signed-off-by: Jason Dillaman --- ceph-iscsi-stable/build/build_rpm | 33 +++++++++---------- .../config/definitions/ceph-iscsi-stable.yml | 31 ++++------------- 2 files changed, 22 insertions(+), 42 deletions(-) diff --git a/ceph-iscsi-stable/build/build_rpm b/ceph-iscsi-stable/build/build_rpm index 4acdae56..47d48020 100644 --- a/ceph-iscsi-stable/build/build_rpm +++ b/ceph-iscsi-stable/build/build_rpm @@ -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 diff --git a/ceph-iscsi-stable/config/definitions/ceph-iscsi-stable.yml b/ceph-iscsi-stable/config/definitions/ceph-iscsi-stable.yml index 36a78c4c..8dbdd653 100644 --- a/ceph-iscsi-stable/config/definitions/ceph-iscsi-stable.yml +++ b/ceph-iscsi-stable/config/definitions/ceph-iscsi-stable.yml @@ -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 @@ -40,14 +29,9 @@ 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: -- 2.39.5