]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
nfs-ganesha: fix scm section, add absolute paths 609/head
authorAli Maredia <amaredia@redhat.com>
Fri, 6 Jan 2017 02:30:21 +0000 (08:00 +0530)
committerAli Maredia <amaredia@redhat.com>
Fri, 6 Jan 2017 11:34:40 +0000 (17:04 +0530)
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 <amaredia@redhat.com>
nfs-ganesha/build/build_deb
nfs-ganesha/build/build_rpm
nfs-ganesha/build/setup
nfs-ganesha/config/definitions/nfs-ganesha.yml

index 933508c5b5802195e253f331d2735b23dd6228b0..b342b5b64d4ad90a61e931cd55d5903a3b215c75 100644 (file)
@@ -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
index 09799bda117f10b6dd3568ba78596ec87ea09aba..89557860a58e28b10423ab18bbba0b40a1bc248f 100644 (file)
@@ -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}
index 41939805af3c6bb7e1ae7953ee9fec535907bb01..4abb70880769de44520559cf6e0816f29777e324 100644 (file)
@@ -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
 
index baec604fa6faf18837c349b06701703904f20504..2a4a5c22a9b6ec30b6c0abd29d2c7e764f69f6b1 100644 (file)
@@ -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: |