Browse Source

jenkins builds rpms

Grant Limberg 5 years ago
parent
commit
fb559434b6
1 changed files with 8 additions and 6 deletions
  1. 8 6
      Jenkinsfile

+ 8 - 6
Jenkinsfile

@@ -443,15 +443,17 @@ def buildCentosNative() {
                 runtime.inside {
                     dir("build") {
                         if (distro == 'centos7' && arch == 'amd64') {
-                            sh 'source scl_source enable devtoolset-8 llvm-toolset-7 && make'
+                            sh 'source scl_source enable devtoolset-8 llvm-toolset-7 && CMAKE_ARGS="-DZT_PACKAGE_FORMAT=RPM" make setup'
                         } else {
-                            sh 'make'
+                            sh 'CMAKE_ARGS="-DZT_PACKAGE_FORMAT=RPM" make setup'
+                        }
+                        dir ("build") {
+                            sh 'make package -j4'
                         }
-                        // sh 'make redhat'
-                        // sh "mkdir -p ${distro}"
-                        // sh "cp -av `find ~/rpmbuild/ -type f -name \"*.rpm\"` ${distro}/"
-                        // archiveArtifacts artifacts: "${distro}/*.rpm", onlyIfSuccessful: true
                     }
+                    sh "mkdir -p ${distro}"
+                    sh "cp -av build/build/*.rpm` ${distro}/"
+                    archiveArtifacts artifacts: "${distro}/*.rpm", onlyIfSuccessful: true
                     
                     cleanWs deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true
                 }