From 56787962722f3f55a1655ba18005ca0d4caa0587 Mon Sep 17 00:00:00 2001 From: Ali Maredia Date: Fri, 6 Jan 2017 08:00:21 +0530 Subject: [PATCH] nfs-ganesha: fix scm section, add absolute paths Made changes to scm section to configure both git repos. Made all references to "dist" dir absolute paths Made sure directories being git cleaned are actual git repos Signed-off-by: Ali Maredia --- nfs-ganesha/build/build_deb | 6 +-- nfs-ganesha/build/build_rpm | 8 +-- nfs-ganesha/build/setup | 5 ++ .../config/definitions/nfs-ganesha.yml | 51 ++++++++++--------- 4 files changed, 39 insertions(+), 31 deletions(-) diff --git a/nfs-ganesha/build/build_deb b/nfs-ganesha/build/build_deb index 933508c5..b342b5b6 100644 --- a/nfs-ganesha/build/build_deb +++ b/nfs-ganesha/build/build_deb @@ -56,7 +56,7 @@ PBUILDDIR="/srv/debian-base" sudo pbuilder --clean -mkdir -p dist/deb +mkdir -p $WORKSPACE/dist/deb REPO_URL="https://shaman.ceph.com/api/repos/ceph/$CEPH_BRANCH/$CEPH_SHA1/$DISTRO/$DIST/repo" echo "EXTRAPACKAGES=\"libcephfs-dev\"" >> ~/.pbuilderrc @@ -66,9 +66,9 @@ echo "Building debs for $DIST" sudo pbuilder build \ --distribution $DIST \ --basetgz $PBUILDDIR/$DIST.tgz \ - --buildresult dist/deb/ \ + --buildresult $WORKSPACE/dist/deb/ \ --debbuildopts "-j`grep -c processor /proc/cpuinfo`" \ - dist/nfs-ganesha_$VERSION.dsc + $WORKSPACE/dist/nfs-ganesha_$VERSION.dsc ## Upload the created RPMs to chacra diff --git a/nfs-ganesha/build/build_rpm b/nfs-ganesha/build/build_rpm index 09799bda..89557860 100644 --- a/nfs-ganesha/build/build_rpm +++ b/nfs-ganesha/build/build_rpm @@ -41,12 +41,12 @@ cmake -DCMAKE_BUILDER_TYPE=Maintainer -DUSE_FSAL_RGW=YES -DUSE_FSAL_CEPH=YES $WO ## Create the source rpm echo "Building SRPM" rpmbuild \ - --define "_sourcedir ./dist" \ + --define "_sourcedir $WORKSPACE/dist" \ --define "_specdir ." \ --define "_builddir ." \ --define "_srcrpmdir ." \ --define "_rpmdir ." \ - --nodeps -bs ../src/nfs-ganesha.spec + --nodeps -bs $WORKSPACE/nfs-ganesha/src/nfs-ganesha.spec SRPM=$(readlink -f *.src.rpm) # add repo file to mock config @@ -57,7 +57,7 @@ echo "\"\"\"" >> nfs-ganesha.cfg ## Build the binaries with mock echo "Building RPMs" -sudo mock -r nfs-ganesha.cfg --resultdir=./dist/rpm/ ${SRPM} +sudo mock -r nfs-ganesha.cfg --resultdir=$WORKSPACE/dist/rpm/ ${SRPM} ## Upload the created RPMs to chacra @@ -66,7 +66,7 @@ chacra_endpoint="nfs-ganesha/${NFS_GANESHA_BRANCH}/${GIT_COMMIT}/${DISTRO}/${REL [ "$FORCE" = true ] && chacra_flags="--force" || chacra_flags="" # push binaries to chacra -find ./dist/rpm/ | egrep '\.rpm$' | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/$ARCH/ +find $WORKSPACE/dist/rpm/ | egrep '\.rpm$' | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/$ARCH/ # start repo creation $VENV/chacractl repo update ${chacra_endpoint} diff --git a/nfs-ganesha/build/setup b/nfs-ganesha/build/setup index 41939805..4abb7088 100644 --- a/nfs-ganesha/build/setup +++ b/nfs-ganesha/build/setup @@ -20,9 +20,14 @@ cd $WORKSPACE get_distro_and_target # Perform a clean-up +cd $WORKSPACE/nfs-ganesha +git clean -fxd + +cd $WORKSPACE/nfs-ganesha-debian git clean -fxd # Make sure the dist directory is clean +cd $WORKSPACE rm -rf dist mkdir -p dist diff --git a/nfs-ganesha/config/definitions/nfs-ganesha.yml b/nfs-ganesha/config/definitions/nfs-ganesha.yml index baec604f..2a4a5c22 100644 --- a/nfs-ganesha/config/definitions/nfs-ganesha.yml +++ b/nfs-ganesha/config/definitions/nfs-ganesha.yml @@ -1,3 +1,28 @@ +- scm: + name: nfs-ganesha + scm: + - git: + url: https://github.com/nfs-ganesha/nfs-ganesha.git + # Use the SSH key attached to the ceph-jenkins GitHub account. + credentials-id: '39fa150b-b2a1-416e-b334-29a9a2c0b32d' + branches: + - $NFS_GANESHA_BRANCH + skip-tag: true + wipe-workspace: true + basedir: "nfs-ganesha" + +- scm: + name: nfs-ganesha-debian + scm: + - git: + url: https://github.com/nfs-ganesha/nfs-ganesha-debian.git + # Use the SSH key attached to the ceph-jenkins GitHub account. + credentials-id: '39fa150b-b2a1-416e-b334-29a9a2c0b32d' + branches: + - xenial-nfs-ganesha-ceph-fsals + skip-tag: true + wipe-workspace: true + basedir: "nfs-ganesha-debian" - job: name: nfs-ganesha project-type: matrix @@ -61,13 +86,9 @@ If this is checked, then the binaries will be built and pushed to chacra even if type: label-expression name: AVAILABLE_DIST values: - - centos6 - centos7 - trusty - xenial - - jessie - - precise - - wheezy - axis: type: dynamic name: DIST @@ -83,26 +104,8 @@ If this is checked, then the binaries will be built and pushed to chacra even if - ARCHS scm: - - git: - url: https://github.com/nfs-ganesha/nfs-ganesha.git - # Use the SSH key attached to the ceph-jenkins GitHub account. - credentials-id: '39fa150b-b2a1-416e-b334-29a9a2c0b32d' - branches: - - $NFS_GANESHA_BRANCH - skip-tag: true - wipe-workspace: true - basedir: "nfs-ganesha" - - scm: - - git: - url: https://github.com/nfs-ganesha/nfs-ganesha-debian.git - # Use the SSH key attached to the ceph-jenkins GitHub account. - credentials-id: '39fa150b-b2a1-416e-b334-29a9a2c0b32d' - branches: - - xenial-nfs-ganesha-ceph-fsals - skip-tag: true - wipe-workspace: true - basedir: "nfs-ganesha-debian" + - nfs-ganesha + - nfs-ganesha-debian builders: - shell: | -- 2.39.5