Unverified Commit f79926bd authored by Maxim Cournoyer's avatar Maxim Cournoyer
Browse files

Jenkinsfile: Add parameters to allow skipping Qt, ARM packages.

* Jenkinsfile [parameters]: New directive.
(Build packages): Skip building custom Qt or ARM packages depending on
the parameter values.

GitLab: jami-packaging#98
Change-Id: Ic68af873483ac92319061baf5f14ef7323a27a26
parent 9d5387f0
......@@ -8,6 +8,19 @@ pipeline {
label 'guix'
}
parameters {
string(name: 'GERRIT_REFSPEC',
defaultValue: 'refs/heads/master',
description: 'The Gerrit refspec to fetch.')
booleanParam(name: 'BUILD_OWN_QT',
defaultValue: false,
description: 'Whether to build our own Qt packages.')
booleanParam(name: 'BUILD_ARM',
defaultValue: false,
description: 'Whether to build ARM packages.')
}
environment {
TARBALLS = '/opt/ring-contrib' // set the cache directory
}
......@@ -28,7 +41,7 @@ See https://wiki.savoirfairelinux.com/wiki/Jenkins.jami.net#Configuration"
stage('Fetch submodules') {
steps {
echo 'Updating relevant submodules to their latest commit'
sh 'git submodule update --init --recursive --remote' +
sh 'git submodule update --init --recursive --remote ' +
'daemon lrc client-gnome client-qt'
}
}
......@@ -53,8 +66,15 @@ See https://wiki.savoirfairelinux.com/wiki/Jenkins.jami.net#Configuration"
}
steps {
script {
def targetsText = sh script: 'make -s list-package-targets', returnStdout: true
def targetsText = sh(script: 'make -s list-package-targets',
returnStdout: true)
def targets = targetsText.split('\n')
if (!params.BUILD_OWN_QT) {
targets = targets.findAll { !it.endsWith('_qt') }
}
if (!params.BUILD_ARM) {
targets = targets.findAll { !(it =~ /_(armhf|arm64)$/) }
}
def stages = [:]
targets.each { target ->
......
Supports Markdown
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