]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
import takora 114/head
authorKen Dreyer <kdreyer@redhat.com>
Thu, 27 Aug 2015 21:46:17 +0000 (15:46 -0600)
committerKen Dreyer <kdreyer@redhat.com>
Thu, 27 Aug 2015 21:46:41 +0000 (15:46 -0600)
Start building upstream packages for https://github.com/ceph/takora

takora/build/build [new file with mode: 0644]
takora/config/definitions/takora.yml [new file with mode: 0644]

diff --git a/takora/build/build b/takora/build/build
new file mode 100644 (file)
index 0000000..341de2d
--- /dev/null
@@ -0,0 +1,36 @@
+#/bin/bash -ex
+
+echo "BRANCH: $BRANCH"
+cd $WORKSPACE/takora
+
+DEBIAN=0
+
+if [ $Dist = 'trusty' -o $Dist = 'precise' -o $Dist = 'wheezy' ] ; then
+    DEBIAN=1
+fi
+
+if [ $DEBIAN = 1 ] ; then
+    dpkg-buildpackage -us -uc
+else
+    python ./setup.py sdist
+
+    RPMBUILD=$WORKSPACE/rpmbuild
+    mkdir -p $RPMBUILD/{SOURCES,SRPMS,SPECS,RPMS,BUILD}
+    cp -a dist/takora*.tar.gz  $RPMBUILD/SOURCES/.
+    cp -a takora.spec $RPMBUILD/SPECS/.
+
+    cd $RPMBUILD
+    rpmbuild -ba --define "_topdir $RPMBUILD" SPECS/takora.spec
+fi
+
+cd $WORKSPACE
+rm -rf $BRANCH
+mkdir $BRANCH
+
+if [ $DEBIAN = 1 ] ; then
+    mv *.deb *.dsc *.changes *.tar.gz $BRANCH
+else
+    find rpmbuild -name '*.rpm' -o -name '*.srpm' | xargs -i mv {} $BRANCH
+fi
+
+exit 0
diff --git a/takora/config/definitions/takora.yml b/takora/config/definitions/takora.yml
new file mode 100644 (file)
index 0000000..0a8497e
--- /dev/null
@@ -0,0 +1,53 @@
+- job:
+    name: takora
+    description: Build and package takora
+    project-type: matrix
+    axes:
+    - axis:
+        name: Arch
+        type: label-expression
+        values:
+        - x86_64
+    - axis:
+        name: Dist
+        type: label-expression
+        values:
+        - trusty
+        - centos
+    block-downstream: false
+    block-upstream: false
+
+    properties:
+    - github:
+        url: https://github.com/ceph/takora/
+
+    scm:
+    - git:
+        skip-tag: true
+        url: https://github.com/ceph/takora
+        branches:
+         - $BRANCH
+
+    execution-strategy:
+      run-sequentially: false
+
+    builders:
+    - shell:
+        !include-raw ../../build/build
+    concurrent: false
+    parameters:
+    - string:
+        default: master
+        description: 'The git branch or tag to build'
+        name: BRANCH
+
+    publishers:
+    - archive:
+        allow-empty: false
+        artifacts: $BRANCH/*
+        default-excludes: true
+        fingerprint: false
+        only-if-success: false
+    - description-setter:
+        regexp: '^BRANCH: (\S+)'
+        set-for-matrix: false