diff --git a/.jenkins/common.groovy b/.jenkins/common.groovy index d9d6ae2b..9456e7c4 100644 --- a/.jenkins/common.groovy +++ b/.jenkins/common.groovy @@ -42,36 +42,9 @@ def runTestCommand (platform, project, gfilter) def runPackageCommand(platform, project) { - - def command - - if(platform.jenkinsLabel.contains('centos') || platform.jenkinsLabel.contains('sles')) - { - command = """ - set -x - cd ${project.paths.project_build_prefix}/build/release - make package - mkdir -p package - mv *.rpm package/ - rpm -qlp package/*.rpm - """ - - platform.runCommand(this, command) - platform.archiveArtifacts(this, """${project.paths.project_build_prefix}/build/release/package/*.rpm""") - } - else - { - command = """ - set -x - cd ${project.paths.project_build_prefix}/build/release - make package - mkdir -p package - mv *.deb package/ - """ - - platform.runCommand(this, command) - platform.archiveArtifacts(this, """${project.paths.project_build_prefix}/build/release/package/*.deb""") - } + def packageHelper = platform.makePackage(platform.jenkinsLabel,"${project.paths.project_build_prefix}/build/release") + platform.runCommand(this, packageHelper[0]) + platform.archiveArtifacts(this, packageHelper[1]) } return this