]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
import ceph-build jjb task
authorKen Dreyer <kdreyer@redhat.com>
Tue, 14 Apr 2015 03:20:11 +0000 (21:20 -0600)
committerKen Dreyer <kdreyer@redhat.com>
Tue, 14 Apr 2015 03:20:55 +0000 (21:20 -0600)
This imports the current settings for "ceph-build" as YAML.

This is an import of the job previously defined in Jenkins' own data
store (ie /home2/jenkins/jobs/ceph-build/config.xml)

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
ceph-build/build/build1 [new file with mode: 0644]
ceph-build/build/build2 [new file with mode: 0644]
ceph-build/config/definitions/ceph-build.yml [new file with mode: 0644]

diff --git a/ceph-build/build/build1 b/ceph-build/build/build1
new file mode 100644 (file)
index 0000000..1406c09
--- /dev/null
@@ -0,0 +1,66 @@
+#!/bin/bash
+#
+# Ceph distributed storage system
+#
+# Copyright (C) 2014 Red Hat <contact@redhat.com>
+#
+# Author: Loic Dachary <loic@dachary.org>
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License, or (at your option) any later version.
+#
+HOST=$(hostname --short)
+echo "Building on $(hostname) Date: $(date)"
+echo "  DIST=${DIST}"
+echo "  BPTAG=${BPTAG}"
+echo "  KEYID=${KEYID}"
+echo "  WS=$WORKSPACE"
+echo "  PWD=$(pwd)"
+echo "  BUILD SOURCE=$COPYARTIFACT_BUILD_NUMBER_CEPH_SETUP"
+echo "*****"
+env
+echo "*****"
+
+DIR=/tmp/install-deps.$$
+trap "rm -fr $DIR" EXIT
+mkdir -p $DIR
+if test $(id -u) != 0 ; then
+    SUDO=sudo
+fi
+export LC_ALL=C # the following is vulnerable to i18n
+
+if test -f /etc/redhat-release ; then
+    $SUDO yum install -y redhat-lsb-core
+fi
+
+if which apt-get > /dev/null ; then
+    $SUDO apt-get install -y lsb-release
+fi
+
+# unpack the tar.gz that contains the debian dir
+cd dist
+tar xzvf *.orig.tar.gz
+cd ceph-*
+pwd
+
+
+
+case $(lsb_release -si) in
+CentOS|Fedora|SUSE*|RedHatEnterpriseServer)
+        case $(lsb_release -si) in
+            SUSE*)
+                $SUDO zypper -y yum-utils
+                ;;
+            *)
+                $SUDO yum install -y yum-utils
+                ;;
+        esac
+        sed -e 's/@//g' < ceph.spec.in > $DIR/ceph.spec
+        $SUDO yum-builddep -y $DIR/ceph.spec
+        ;;
+*)
+        echo "$(lsb_release -si) is unknown, dependencies will have to be installed manually."
+        ;;
+esac
diff --git a/ceph-build/build/build2 b/ceph-build/build/build2
new file mode 100644 (file)
index 0000000..3d2d715
--- /dev/null
@@ -0,0 +1,97 @@
+#export GNUPGHOME=/home/jenkins-build/build/gnupg.autobuild/
+export GNUPGHOME=/home/jenkins-build/build/gnupg.ceph-release/
+export KEYID=17ED316D
+HOST=$(hostname --short)
+echo "Building on $(hostname) Date: $(date)"
+echo "  DIST=${DIST}"
+echo "  BPTAG=${BPTAG}"
+echo "  KEYID=${KEYID}"
+echo "  WS=$WORKSPACE"
+echo "  PWD=$(pwd)"
+echo "  BUILD SOURCE=$COPYARTIFACT_BUILD_NUMBER_CEPH_SETUP"
+echo "*****"
+env
+echo "*****"
+
+if [ ! -d /srv/ceph-build ] ; then
+    echo "Build tools are not installed"
+    exit 1
+fi
+bindir=/srv/ceph-build
+
+case $HOST in
+gitbuilder-cdep-deb* | tala* | mira*)
+    if [ ! -d /srv/debian-base ] ; then
+        echo "debian base is not installed"
+        exit 1
+    fi
+    ;;
+esac
+
+
+vers=`cat ./dist/version`
+# create a release directory for ceph-build tools
+mkdir -p release
+cp -a dist release/${vers}
+echo $DIST > release/${vers}/debian_dists
+echo "${vers}-1" > release/${vers}/debian_version
+
+case $HOST in
+
+gitbuilder-cdep-deb* | tala* | mira*)
+
+        cd release/$vers
+
+        # Dirty Hack:
+        baddist=$(echo $DIST | grep -ic -e squeeze -e wheezy || true)
+        if [ $baddist -eq 1 ]
+        then
+            sed -i 's/ libbabeltrace-ctf-dev, libbabeltrace-dev,//g' ceph_${vers}-1.dsc || true
+            sed -i 's/ liblttng-ust-dev//g' ceph_${vers}-1.dsc || true
+
+        fi
+
+        # unpack sources
+        dpkg-source -x ceph_${vers}-1.dsc
+        if [ $baddist -eq 1 ]
+        then
+            rm -vf *.orig.tar.gz || true
+            grep -v babeltrace ceph-${vers}/debian/control  | grep -v liblttng > ceph-${vers}/debian/control.new
+            mv -v ceph-${vers}/debian/control.new ceph-${vers}/debian/control
+        fi
+        (  cd ceph-${vers}
+           #DEB_VERSION=$(dpkg-parsechangelog | sed -rne 's,^Version: (.*),\1, p' | cut -d'-' -f1)
+           DEB_VERSION=$(dpkg-parsechangelog | sed -rne 's,^Version: (.*),\1, p')
+           #BP_VERSION=${DEB_VERSION}-1${BPTAG}
+           BP_VERSION=${DEB_VERSION}${BPTAG}
+           DEBEMAIL="gary.lowell@inktank.com" dch -D $DIST --force-distribution -b -v "$BP_VERSION" "$comment"
+        )
+        dpkg-source -b ceph-${vers}
+        
+        echo "Building Debian"
+        cd "$WORKSPACE"
+        #$bindir/build_dsc.sh ./release $vers 1 $DIST
+        sudo $bindir/build_debs.sh ./release /srv/debian-base $vers
+
+        #Collect Artifacts
+        mkdir -p dist/debian
+        cp -a release/$vers/*.changes dist/debian/.
+        cp -a release/$vers/*.deb     dist/debian/.
+        cp -a release/$vers/*.dsc     dist/debian/.
+        cp -a release/$vers/*.diff.gz dist/debian/.
+        cp -a release/$vers/*.tar.gz  dist/debian/.
+
+        ;;
+
+*)
+        echo "Building RPMs"
+        $bindir/build_rpms.sh ./release $vers
+        
+        #Collect Artifacts
+        mkdir -p dist/rpm/${DIST}
+        mv release/${vers}/rpm/*/SRPMS ./dist/rpm/${DIST}/.
+        mv release/${vers}/rpm/*/RPMS/* ./dist/rpm/${DIST}/.
+        ;;
+
+esac
+echo "End Date: $(date)"
diff --git a/ceph-build/config/definitions/ceph-build.yml b/ceph-build/config/definitions/ceph-build.yml
new file mode 100644 (file)
index 0000000..81dabe9
--- /dev/null
@@ -0,0 +1,61 @@
+- job:
+    name: ceph-build
+    project-type: matrix
+    defaults: global
+    disabled: false
+    display-name: 'ceph-build'
+    concurrent: false
+    block-downstream: false
+    block-upstream: false
+    properties:
+      - github:
+          url: https://github.com/ceph/ceph
+
+    execution-strategy:
+      combination-filter: |
+        (Arch=="x86_64") || (Arch=="i386" && (Distro=="wheezy-pbuild" || Distro=="precise-pbuild"))
+
+    axes:
+      - axis:
+          type: label-expression
+          name: Arch
+          values:
+            - x86_64
+            - i386
+      - axis:
+          type: label-expression
+          name: Distro
+          values:
+            - squeeze-pbuild
+            - wheezy-pbuild
+            - precise-pbuild
+            - trusty-pbuild
+            - centos6.3
+            - centos6.4
+            - centos6.5
+            - centos7
+            - rhel6.3
+            - rhel6.4
+            - rhel6.5
+            - rhel7
+            - fedora20
+
+    builders:
+      - shell: |
+          echo "Cleaning up workarea"
+          rm -rf dist
+          rm -rf release
+      - copyartifact:
+          project: ceph-setup
+          filter: 'dist/**'
+          which-build: last-successful
+      - shell:
+          !include-raw ../../build/build1
+      - shell:
+          !include-raw ../../build/build2
+
+    publishers:
+      - archive:
+          artifacts: 'dist/**'
+          allow-empty: false
+          latest-only: false