From bdee52b7a5f819112866d6c97e2525e8e32feeb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 11 Jun 2015 14:46:08 +0200 Subject: [PATCH] Makefile: added support for scratch build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is continuous integration Jenkins bind to the scratch builds. By running scratch build during the nightly build all tests will be run by Jenkins. Signed-off-by: Jaroslav Škarvada --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a23c08b..a61b800 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,10 @@ NAME = tuned BUILD = release # which config to use in mock-build target MOCK_CONFIG = rhel-7-x86_64 +# scratch-build for triggering Jenkins +SCRATCH_BUILD_TARGET = rhel-7.2-candidate VERSION = $(shell awk '/^Version:/ {print $$2}' tuned.spec) +GIT_DATE = $(shell date +'%Y%m%d') ifeq ($(BUILD), release) RPM_ARGS += --without snapshot MOCK_ARGS += --without=snapshot @@ -12,7 +15,6 @@ else RPM_ARGS += --with snapshot MOCK_ARGS += --with=snapshot GIT_SHORT_COMMIT = $(shell git rev-parse --short=8 --verify HEAD) - GIT_DATE = $(shell date +'%Y%m%d') GIT_SUFFIX = $(GIT_DATE)git$(GIT_SHORT_COMMIT) GIT_PSUFFIX = .$(GIT_SUFFIX) RPM_VERSION = $(NAME)-$(VERSION)-1$(GIT_PSUFFIX) @@ -71,7 +73,11 @@ mock-devel-build: srpm createrepo: mock-devel-build createrepo mock-result-dir -nightly: createrepo +# scratch build to triggering Jenkins +scratch-build: mock-devel-build + brew build --scratch --nowait rhel-7.2-candidate `ls mock-result-dir/*$(GIT_DATE)git*.*.src.rpm | head -n 1` + +nightly: createrepo scratch-build rsync -ave ssh --delete --progress mock-result-dir/* jskarvad@fedorapeople.org:/home/fedora/jskarvad/public_html/tuned/devel/repo/ install-dirs: