Add a boolean parameter to the buildTarget function of the Jenkinsfile to choose whether to use the debian architecture or the rpm architecture in the names of produced packages
This commit is contained in:
parent
58e54f1b94
commit
b8b809a876
|
@ -1,6 +1,7 @@
|
|||
def buildTarget(String path, String rpmArch, String debArch) {
|
||||
def buildTarget(String path, String rpmArch, String debArch, String isPackageArchDeb = true) {
|
||||
String packageArch = isPackageArchDeb ? debArch : rpmArch;
|
||||
cmakeBuild buildDir: "cmake-build-${debArch}", 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=${debArch}"
|
||||
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}"
|
||||
}
|
||||
|
@ -29,7 +30,7 @@ pipeline { // Multi-branch pipeline script for Yerbacon.
|
|||
cpack installation: 'Main', workingDir: 'cmake-build-release'
|
||||
buildTarget('arm-linux-gnueabi', 'armv4l', 'armel')
|
||||
buildTarget('arm-linux-gnueabihf', 'armv7hl', 'armhf')
|
||||
buildTarget('aarch64-linux-gnu', 'aarch64', 'arm64')
|
||||
buildTarget('aarch64-linux-gnu', 'aarch64', 'arm64', false)
|
||||
}
|
||||
}
|
||||
stage('Build for other platforms') {
|
||||
|
|
Loading…
Reference in New Issue