From f79926bd3c4ae57df2d4c4b5f08f989b1dd9d534 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com> Date: Thu, 20 May 2021 22:57:19 -0400 Subject: [PATCH] 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: https://git.jami.net/savoirfairelinux/jami-packaging/-/issues/98 Change-Id: Ic68af873483ac92319061baf5f14ef7323a27a26 --- Jenkinsfile | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4e14bb1d..f810811b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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 -> -- GitLab