]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
import ceph-release-rpm jjb task 53/head
authorKen Dreyer <kdreyer@redhat.com>
Fri, 1 May 2015 20:23:28 +0000 (14:23 -0600)
committerKen Dreyer <kdreyer@redhat.com>
Fri, 1 May 2015 20:24:32 +0000 (14:24 -0600)
This imports the current settings for "ceph-release-rpm" as YAML.

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

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

diff --git a/ceph-release-rpm/build/build b/ceph-release-rpm/build/build
new file mode 100644 (file)
index 0000000..2094d7f
--- /dev/null
@@ -0,0 +1,162 @@
+#!/bin/sh
+
+#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 ${HOST}"
+echo "  DIST=${DIST}"
+echo "  BPTAG=${BPTAG}"
+echo "  KEYID=${KEYID}"
+echo "  WS=$WORKSPACE"
+echo "  PWD=$(pwd)"
+echo "Building on Host: $(hostname) Date: $(date)"
+
+# Check if we have a key to sign packages with
+if gpg --list-keys 2>/dev/null | grep -q ${KEYID} ; then
+    echo "Signing packages and repo with ${KEYID}"
+else
+    echo "Package signing key (${KEYID}) not found"
+    echo "Have you set \$GNUPGHOME ? "
+    exit 3
+fi
+
+# We expect the ceph build tools to be installed.
+if [ ! -d /srv/ceph-build ] ; then
+    echo "Build tools are not installed"
+    exit 1
+fi
+BINDIR=/srv/ceph-build
+
+# remove any previous builds
+rm -rf dist
+rm -rf RPMBUILD
+
+# What are we building ?
+
+target=$DIST
+if [ "$target" = "centos6.3" ] ; then target=el6 ; fi
+if [ "$target" = "centos7" ] ; then target=el7 ; fi
+if [ "$target" = "fedora18" ] ; then target=fc18 ; fi
+if [ "$target" = "fedora19" ] ; then target=fc19 ; fi
+if [ "$target" = "fedora20" ] ; then target=fc20 ; fi
+if [ "$target" = "rhel6.3" ] ; then target=rhel6 ; fi
+if [ "$target" = "sles11sp2" ] ; then target=sles11 ; fi
+echo "Target directory is: $target"
+
+# setup rpm build area
+mkdir -p RPMBUILD/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
+BUILDAREA=$WORKSPACE/RPMBUILD
+
+# Create and build an RPM for the repository
+cat <<EOF > ${BUILDAREA}/SPECS/ceph-release.spec
+%if 0%{?centos} == 7
+%define dist .el7
+%endif
+
+
+Name:           ceph-release
+Version:        1
+Release:        1%{?dist}
+Summary:        Ceph repository configuration
+Group:          System Environment/Base
+License:        GPLv2
+URL:            http://gitbuilder.ceph.com/$dist
+Source0:        ceph.repo
+#Source0:        RPM-GPG-KEY-CEPH
+#Source1:        ceph.repo
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:     noarch
+
+%description
+This package contains the Ceph repository GPG key as well as configuration
+for yum and up2date.
+
+%prep
+
+%setup -q  -c -T
+install -pm 644 %{SOURCE0} .
+#install -pm 644 %{SOURCE1} .
+
+%build
+
+%install
+rm -rf %{buildroot}
+#install -Dpm 644 %{SOURCE0} \
+#    %{buildroot}/%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-CEPH
+%if 0%{defined suse_version}
+install -dm 755 %{buildroot}/%{_sysconfdir}/zypp
+install -dm 755 %{buildroot}/%{_sysconfdir}/zypp/repos.d
+install -pm 644 %{SOURCE0} \
+    %{buildroot}/%{_sysconfdir}/zypp/repos.d
+%else
+install -dm 755 %{buildroot}/%{_sysconfdir}/yum.repos.d
+install -pm 644 %{SOURCE0} \
+    %{buildroot}/%{_sysconfdir}/yum.repos.d
+%endif
+
+%clean
+#rm -rf %{buildroot}
+
+%post
+
+%postun
+
+%files
+%defattr(-,root,root,-)
+#%doc GPL
+%if 0%{defined suse_version}
+%config(noreplace) /etc/zypp/repos.d/*
+%else
+%config(noreplace) /etc/yum.repos.d/*
+%endif
+#/etc/pki/rpm-gpg/*
+
+%changelog
+* Mon Jan 12 2015 Travis Rhoden <trhoden@redhat.com> 1-1
+- Make .repo files be %config(noreplace)
+* Tue Mar 10 2013 Gary Lowell <glowell@inktank.com> - 1-0
+- Handle both yum and zypper
+- Use URL to ceph git repo for key
+- remove config attribute from repo file
+* Tue Aug 27 2012 Gary Lowell <glowell@inktank.com> - 1-0
+- Initial Package
+EOF
+#  End of ceph-release.spec file.
+# Install ceph.repo file
+
+ceph_release="$RELEASE"
+
+cat <<EOF > $BUILDAREA/SOURCES/ceph.repo
+[Ceph]
+name=Ceph packages for \$basearch
+baseurl=http://ceph.com/rpm-${ceph_release}/${target}/\$basearch
+enabled=1
+gpgcheck=1
+type=rpm-md
+gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc
+
+[Ceph-noarch]
+name=Ceph noarch packages
+baseurl=http://ceph.com/rpm-${ceph_release}/${target}/noarch
+enabled=1
+gpgcheck=1
+type=rpm-md
+gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc
+
+[ceph-source]
+name=Ceph source packages
+baseurl=http://ceph.com/rpm-${ceph_release}/${target}/SRPMS
+enabled=1
+gpgcheck=1
+type=rpm-md
+gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc
+EOF
+# End of ceph.repo file
+
+rpmbuild -ba --define "_topdir ${BUILDAREA}" --define "_unpackaged_files_terminate_build 0" ${BUILDAREA}/SPECS/ceph-release.spec
+if [ $? -eq 0 ] ; then
+    mkdir -p $WORKSPACE/dist
+    mv $BUILDAREA/RPMS/* $WORKSPACE/dist/.
+    mv $BUILDAREA/SRPMS $WORKSPACE/dist/.
+fi
diff --git a/ceph-release-rpm/config/definitions/ceph-release-rpm.yml b/ceph-release-rpm/config/definitions/ceph-release-rpm.yml
new file mode 100644 (file)
index 0000000..6c3bf9f
--- /dev/null
@@ -0,0 +1,50 @@
+- job:
+    name: ceph-release-rpm
+    project-type: matrix
+    defaults: global
+    disabled: false
+    description: Builds the repository configuration package for ceph-release.  RPMS Only
+    concurrent: false
+    block-downstream: false
+    block-upstream: false
+
+    execution-strategy:
+      combination-filter: Arch=="x86_64"
+
+    parameters:
+      - string:
+          name: RELEASE
+          default: firefly
+
+    axes:
+      - axis:
+          type: label-expression
+          name: Arch
+          values:
+            - x86_64
+            - i386
+            - arm7l
+      - axis:
+          type: label-expression
+          name: label_exp
+          values:
+            - centos6.3
+            - centos7
+            - rhel6.3
+            - fedora20
+            - sles11sp2
+            - rhel7
+
+    builders:
+      - shell:
+          !include-raw ../../build/build
+      - copyartifact:
+          project: ceph-release-rpm
+          filter: 'dist/**'
+          which-build: last-successful
+
+    publishers:
+      - archive:
+          artifacts: 'dist/**'
+          allow-empty: false
+          latest-only: false