diff --git a/Jenkinsfile b/Jenkinsfile index 01905c3..1494976 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') { @@ -30,6 +37,7 @@ pipeline { } } } + /* stage('Get other repos used by gluon') { steps { dir('gluon') { @@ -37,5 +45,33 @@ pipeline { } } } + */ + stage('Trigger target builds') { + when { + expression { + return params.GLUON_TARGET == 'ALL' + } + } + steps { + dir('gluon') { + build job: 'nigthly-wireguard', parameters: [ + string(name: 'GLUON_TARGET', value: "ath79") + ] + script { + //def targets_string = sh(script: 'make list-targets', returnStdout: true) + //def targets = targets_string.tokenize('\n') + //def built = build(job: "nightly-wireguard", wait: true, propagate: false, parameters: [string(name: 'GLUON_TARGET', value: "ath79")]) + targets.each { target_name -> + stage("Build ${target_name}") { + echo "${target_name}" + //def built = build(job: "nightly-wireguard", wait: true, propagate: false, parameters: [ + // string(name: 'GLUON_TARGET', value: "${target_name}") + //]) + } + } + } + } + } + } } }