From a686752058746831a3039780b090b91123226ba8 Mon Sep 17 00:00:00 2001 From: "aiyion.prime" Date: Sat, 29 Jun 2024 23:08:02 +0200 Subject: [PATCH] =?UTF-8?q?ci:=20Lau=C5=84ch=20subbuilds=20in=20case=20tar?= =?UTF-8?q?get=20is=20ALL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit params.GLUON_TARGET --- Jenkinsfile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 01905c3..5cba642 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,11 @@ pipeline { + parameters { + string( + defaultValue: 'ALL', + name: 'GLUON_TARGET', + trim: true + ) + } agent { label 'linux' } stages { stage('Clone gluon') { @@ -37,5 +44,28 @@ pipeline { } } } + stage('Trigger target builds') { + when { + expression { + return params.GLUON_TARGET == 'ALL' + } + } + steps { + dir('gluon') { + script { + def targets_string = sh(script: 'make list-targets', returnStdout: true) + def targets = targets_string.tokenize('\n') + targets.each { target_name -> + stage("Build ${target_name}") { + def built = build(job: "nightly-wireguard", wait: true, propagate: false, parameters: [ + string(name: 'GLUON_TARGET', value: "${target_name}") + ]) + build job: 'nightly-wireguard', parameters: [string(name: 'GLUON_TARGET', value: "${target_name}")], propagate: false + } + } + } + } + } + } } }