Commit 4c6f3f35 authored by Dominik Charousset's avatar Dominik Charousset

Only generate artifacts for the master branch

parent dae251f3
...@@ -123,11 +123,14 @@ def cmakeSteps(buildType, cmakeArgs, installDir) { ...@@ -123,11 +123,14 @@ def cmakeSteps(buildType, cmakeArgs, installDir) {
workingDir: 'build', workingDir: 'build',
]) ])
} }
// Only generate artifacts for the master branch.
if (PrettyJobBaseName == 'master') {
zip([ zip([
archive: true, archive: true,
dir: installDir, dir: installDir,
zipFile: "${installDir}.zip", zipFile: "${installDir}.zip",
]) ])
}
} }
// Builds `name` with CMake and runs the unit tests. // Builds `name` with CMake and runs the unit tests.
...@@ -188,9 +191,11 @@ pipeline { ...@@ -188,9 +191,11 @@ pipeline {
environment { environment {
LD_LIBRARY_PATH = "$WORKSPACE/caf-sources/build/lib" LD_LIBRARY_PATH = "$WORKSPACE/caf-sources/build/lib"
DYLD_LIBRARY_PATH = "$WORKSPACE/caf-sources/build/lib" DYLD_LIBRARY_PATH = "$WORKSPACE/caf-sources/build/lib"
PrettyJobBaseName = env.JOB_BASE_NAME.replace('%2F', '/')
PrettyJobName = "CAF build #${env.BUILD_NUMBER} for $PrettyJobBaseName"
} }
stages { stages {
stage ('Git Checkout') { stage('Git Checkout') {
agent { label 'master' } agent { label 'master' }
steps { steps {
deleteDir() deleteDir()
...@@ -224,18 +229,18 @@ pipeline { ...@@ -224,18 +229,18 @@ pipeline {
post { post {
success { success {
emailext( emailext(
subject: "✅ CAF build #${env.BUILD_NUMBER} succeeded for job ${env.JOB_NAME}", subject: "✅ $PrettyJobName succeeded",
recipientProviders: [culprits(), developers(), requestor(), upstreamDevelopers()], recipientProviders: [culprits(), developers(), requestor(), upstreamDevelopers()],
body: "Check console output at ${env.BUILD_URL}.", body: "Check console output at ${env.BUILD_URL}.",
) )
} }
failure { failure {
emailext( emailext(
subject: "⛔️ CAF build #${env.BUILD_NUMBER} failed for job ${env.JOB_NAME}", subject: "⛔️ $PrettyJobName failed",
attachLog: true, attachLog: true,
compressLog: true, compressLog: true,
recipientProviders: [culprits(), developers(), requestor(), upstreamDevelopers()], recipientProviders: [culprits(), developers(), requestor(), upstreamDevelopers()],
body: "Check console output at ${env.BUILD_URL} or see attached log.", body: "Check console output at ${env.BUILD_URL} or see attached log.\n",
) )
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment