Use GNU strip on produced executables in the buildTarget functions of the Jenkinsfile

This commit is contained in:
Username404 2021-08-16 11:52:38 +02:00
parent 18da9b800a
commit 82dde27690
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1

7
Jenkinsfile vendored
View File

@ -1,9 +1,10 @@
def buildTarget(String path, String rpmArch, String debArch, boolean isPackageArchDeb = true) {
String packageArch = isPackageArchDeb ? debArch : rpmArch;
cmakeBuild buildDir: "cmake-build-${debArch}", buildType: 'release', cleanBuild: true, installation: 'Main',
cmakeBuild buildDir: "cmake-build-${packageArch}", buildType: 'release', cleanBuild: true, installation: 'Main',
cmakeArgs: "-DCMAKE_C_COMPILER=/usr/bin/${path}-gcc -DCMAKE_CXX_COMPILER=/usr/bin/${path}-g++ -DCMAKE_LINKER=/usr/bin/${path}-ld.gold -DCMAKE_AR=/usr/bin/${path}-ar -DCPACK_RPM_PACKAGE_ARCHITECTURE=${rpmArch} -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=${debArch} -DCXX_TARGET=${packageArch}"
cmake arguments: "--build ./cmake-build-${debArch} --target ybcon", installation: 'Main'
cpack installation: 'Main', workingDir: "cmake-build-${debArch}"
cmake arguments: "--build ./cmake-build-${packageArch} --target ybcon", installation: 'Main'
sh "/usr/bin/${path}-strip ./cmake-build-${packageArch}/ybcon"
cpack installation: 'Main', workingDir: "cmake-build-${packageArch}"
}
pipeline { // Multi-branch pipeline script for Yerbacon.