From 623bb8ae0cc5a866ed25c157c73e40228e0d8027 Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Fri, 3 Aug 2018 10:08:55 +0200
Subject: [PATCH] tests of ci rpm build

---
 .gitlab-ci.yml | 33 +++++++++++++++++++++++++++++++--
 1 file changed, 31 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ecc25345eb..b628f093c8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,8 +14,10 @@ test_frontend:
 build_war:
   image: debian
   stage: build
-  only:
-    - tags
+#  only:
+#    - tags
+  tags:
+     - privileged
   artifacts:
     paths:
       - minerva.war
@@ -84,4 +86,31 @@ test_install_debian_package:
      - test 200 = $(curl --write-out %{http_code} --silent --output /dev/null -c cookie.txt http://localhost:8080/minerva/api/doLogin)
      - test 200 = $(curl --write-out %{http_code} --silent --output /dev/null --cookie cookie.txt http://localhost:8080/minerva/api/projects/)
 
+build_rpm:
+  image: centos:7
+  stage: build
+  dependencies:
+    - build_war
+#  only:
+#    - tags
+  tags:
+     - privileged
+  artifacts:
+    paths:
+      - "rpm/rpmbuildtemp/RPMS/noarch/minerva-*.rpm"
+  script:
+    - yum -y install rpmdevtools unzip
+    - rpm/buildrpm.sh minerva.war
 
+rpmlint:
+  image: centos:7
+  stage: test
+  dependencies:
+    - build_rpm
+  tags:
+     - privileged
+#  only:
+#    - tags
+  script:
+    - yum -y install rpmlint
+    - rpmlint rpm/rpmbuildtemp/RPMS/noarch/minerva-*.rpm
-- 
GitLab