jenkinsfile.release: add optional ABI test stage
@@ -52,6 +52,11 @@ properties([
description: 'True if the source package should be published. Disable when rebuilding to avoid overwriting existing source packages.',
name: 'publish_source_package'
),
+ booleanParam(
+ defaultValue: false,
+ description: 'True if ABI tests with the previous test package should be run.',
+ name: 'abi_test'
+ ),
string(
defaultValue: '',
description: '[OPTIONAL] Override previous release version. Use if latest git version tag does not correspond to previous released Elektra version.',
@@ -110,6 +115,10 @@ stage('Test packages') {
parallel generateInstalledPackagesTestStages()
}
+maybeStag('ABI tests', params.abi_test) {
+ parallel generateAbiTestStages()
+}
+
// Pause pipeline and wait for approval to run publishing steps
input(message: 'Publish Release?', ok: 'Yes')
@@ -312,6 +321,23 @@ def dockerInit() {
"./scripts/docker/website/Dockerfile",
false
)
+
+ /*
+ * ABI test images
+ */
+ DOCKER_IMAGES.fedora_34_abi = dockerUtils.createDockerImageDesc(
+ 'fedora-34-abi', dockerUtils.&idArtifact,
+ './release-artifact/*/package/fedora34/',
+ './scripts/docker/fedora/34/abi.Dockerfile',
+ false
+ )
+
+ DOCKER_IMAGES.bullseye_abi = dockerUtils.createDockerImageDesc(
+ 'debian-bullseye-abi', dockerUtils.&idArtifact,
+ './release-artifact/*/package/bullseye/',
+ './scripts/docker/debian/bullseye/abi.Dockerfile',
+ false
+ )
}
}
@@ -398,6 +424,16 @@ def generateDockerBuildStagesWithPackagesInstalled() {
// build website
tasks << buildWebsite('debian-buster')
+ // build abi images
+ tasks << buildImageWithPackagesStage(
+ DOCKER_IMAGES.fedora_34_abi,
+ 'fedora-34'
+ )
+ tasks << buildImageWithPackagesStage(
+ DOCKER_IMAGES.bullseye_abi,
+ 'debian-bullseye'
+ )
+
return tasks
}
@@ -434,6 +470,21 @@ def generateInstalledPackagesTestStages() {
return tasks
}
+def generateAbiTestStages() {
+ def tasks = [:]
+
+ tasks << testAbiPackage(
+ 'fedora-34-abi',
+ DOCKER_IMAGES.fedora_34_abi
+ )
+ tasks << testAbiPackage(
+ 'debian-bullseye-abi',
+ DOCKER_IMAGES.bullseye_abi
+ )
+
+ return tasks
+}
+
/**
* Generates stages to publish deb packages
*/
@@ -699,6 +750,18 @@ def testInstalledPackage(stageName, image) {
}]
}
+def testAbiPackage(stageName, image) {
+ return [(stageName): {
+ stage(stageName) {
+ withDockerEnv(image, [DockerOpts.MOUNT_MIRROR]) {
+ checkout scm
+ sh "CHECK_VERSION=NO kdb run_all"
+ deleteDir()
+ }
+ }
+ }]
+}
+
/**
* Publish changes and artifacts
*
