gplugin/builders

Add support for fedora 25 and 26

2017-09-26, Gary Kramlich
4a028ace9f39
Parents 423682232b83
Children 5f1f31eb12ec
Add support for fedora 25 and 26
--- a/Dockerfile.fedora-25-amd64 Sun Aug 27 04:05:40 2017 -0500
+++ b/Dockerfile.fedora-25-amd64 Tue Sep 26 22:09:49 2017 -0500
@@ -13,5 +13,8 @@
CMD ["/build.sh"]
+ENV DISTRIBUTION=fedora \
+ VERSION=25 \
+ ARCH=amd64
+
COPY rpm/build.sh /build.sh
-
--- a/Dockerfile.fedora-26-amd64 Sun Aug 27 04:05:40 2017 -0500
+++ b/Dockerfile.fedora-26-amd64 Tue Sep 26 22:09:49 2017 -0500
@@ -13,5 +13,8 @@
CMD ["/build.sh"]
+ENV DISTRIBUTION=fedora \
+ VERSION=26 \
+ ARCH=amd64
+
COPY rpm/build.sh /build.sh
-
--- a/rpm/build.sh Sun Aug 27 04:05:40 2017 -0500
+++ b/rpm/build.sh Tue Sep 26 22:09:49 2017 -0500
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -ex
# Copyright (C) 2015-2016 Gary Kramlich <grim@reaperworld.com>
#
# This program is free software; you can redistribute it and/or modify
@@ -15,26 +15,22 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-set -ex
+cd ${CONVEY_WORKSPACE}
-trap "EC=$?; chown -R ${UID}:${GID} /artifacts; exit \${EC}" INT QUIT TERM EXIT
+BUILD_TRIPLET=${DISTRIBUTION}-${VERSION}-${ARCH}
-cd /src
+ARTIFACTS_DIR=${CONVEY_WORKSPACE}/${BUILD_TRIPLET}
+mkdir -p ${ARTIFACTS_DIR}
-# fig out or build number
BUILD_NUMBER="${BUILD_NUMBER:-0}"
-BUILD_NUMBER="${BUILD_NUMBER}~$(hg id -i)"
+BUILD_VERSION="${BUILD_NUMBER}~$(hg id -i)"
-# we need to generate the spec file so we need to run the cmake configure
-cmake .
-# and then remove CMakeCache.txt to make rpm build run
-rm -f CMakeCache.txt
+# we need to generate the spec file so we need to run a meson
+meson /tmp/${BUILD_TRIPLET}
-# now build the rpm
+# now that we have our rpm spec file we can do an rpmbuild
rpmbuild -bb \
- -D "_rpmdir /artifacts/" \
- -D "_builddir `pwd`" \
- -D "build_number ${BUILD_NUMBER}" \
- packaging/gplugin.spec
-
-find -name "*-junit.xml" -exec cp {} /artifacts/ \;
+ -D "_rpmdir ${ARTIFACTS_DIR}" \
+ -D "_builddir ${CONVEY_WORKSPACE}" \
+ -D "build_number ${BUILD_VERSION}" \
+ /tmp/${BUILD_TRIPLET}/packaging/gplugin.spec